Skip to content

Commit 0826b13

Browse files
Paulo Alcantarasmfrench
authored andcommitted
smb: client: fix DFS failover in multiuser mounts
For sessions and tcons created on behalf of new users accessing a multiuser mount, matching their sessions in tcon_super_cb() with master tcon will always lead to false as every new user will have its own session and tcon. All multiuser sessions, however, will inherit ->dfs_root_ses from master tcon, so match it instead. Signed-off-by: Paulo Alcantara (Red Hat) <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent 85633c0 commit 0826b13

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/smb/client/misc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1111,7 +1111,8 @@ static void tcon_super_cb(struct super_block *sb, void *arg)
11111111
t2 = cifs_sb_master_tcon(cifs_sb);
11121112

11131113
spin_lock(&t2->tc_lock);
1114-
if (t1->ses == t2->ses &&
1114+
if ((t1->ses == t2->ses ||
1115+
t1->ses->dfs_root_ses == t2->ses->dfs_root_ses) &&
11151116
t1->ses->server == t2->ses->server &&
11161117
t2->origin_fullpath &&
11171118
dfs_src_pathname_equal(t2->origin_fullpath, t1->origin_fullpath))

0 commit comments

Comments
 (0)