Skip to content

Commit 9e6002c

Browse files
Paulo Alcantarasmfrench
authored andcommitted
cifs: ignore ipc reconnect failures during dfs failover
If it failed to reconnect ipc used for getting referrals, we can just ignore it as it is not required for reconnecting the share. The worst case would be not being able to detect or chase nested links as long as dfs root server is unreachable. Before patch: $ mount.cifs //root/dfs/link /mnt -o echo_interval=10,... -> target share: /fs0/share disconnect root & fs0 $ ls /mnt ls: cannot access '/mnt': Host is down connect fs0 $ ls /mnt ls: cannot access '/mnt': Resource temporarily unavailable After patch: $ mount.cifs //root/dfs/link /mnt -o echo_interval=10,... -> target share: /fs0/share disconnect root & fs0 $ ls /mnt ls: cannot access '/mnt': Host is down connect fs0 $ ls /mnt bar.rtf dir1 foo Signed-off-by: Paulo Alcantara (SUSE) <[email protected]> Reviewed-by: Enzo Matsumiya <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent 67fcb2c commit 9e6002c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

fs/cifs/dfs.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,8 +401,7 @@ static int __tree_connect_dfs_target(const unsigned int xid, struct cifs_tcon *t
401401
if (ipc->need_reconnect) {
402402
scnprintf(tree, MAX_TREE_SIZE, "\\\\%s\\IPC$", server->hostname);
403403
rc = ops->tree_connect(xid, ipc->ses, tree, ipc, cifs_sb->local_nls);
404-
if (rc)
405-
break;
404+
cifs_dbg(FYI, "%s: reconnect ipc: %d\n", __func__, rc);
406405
}
407406

408407
scnprintf(tree, MAX_TREE_SIZE, "\\%s", share);

0 commit comments

Comments
 (0)