Message ID | 20230607185313.11363-3-risbhat@amazon.com |
---|---|
State | New |
Headers | show |
Series | Backport few dfs related fixes to cifs | expand |
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index b5cd3dc479ce..d8d9d9061544 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -513,11 +513,13 @@ cifs_reconnect(struct TCP_Server_Info *server) sb = NULL; } else { cifs_sb = CIFS_SB(sb); - rc = reconn_setup_dfs_targets(cifs_sb, &tgt_list); - if (rc && (rc != -EOPNOTSUPP)) { - cifs_server_dbg(VFS, "%s: no target servers for DFS failover\n", - __func__); + if (rc) { + cifs_sb = NULL; + if (rc != -EOPNOTSUPP) { + cifs_server_dbg(VFS, "%s: no target servers for DFS failover\n", + __func__); + } } else { server->nr_targets = dfs_cache_get_nr_tgts(&tgt_list); }