This disables tcon re-use for DFS shares. tcon->dfs_path stores the path that the tcon should connect to when doing failing over. If that tcon is used multiple times e.g. 2 mounts using it with different prefixpath, each will need a different dfs_path but there is only one tcon. The other solution would be to split the tcon in 2 tcons during failover but that is much harder. Signed-off-by: Paulo Alcantara (SUSE) <pc@xxxxxx> Reviewed-by: Aurelien Aptel <aaptel@xxxxxxxx> --- fs/cifs/connect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 95b3ab0ca8c0..ac6d286fe79f 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -3373,7 +3373,7 @@ cifs_find_tcon(struct cifs_ses *ses, struct smb_vol *volume_info) spin_lock(&cifs_tcp_ses_lock); list_for_each(tmp, &ses->tcon_list) { tcon = list_entry(tmp, struct cifs_tcon, tcon_list); - if (!match_tcon(tcon, volume_info)) + if (!match_tcon(tcon, volume_info) || tcon->dfs_path) continue; ++tcon->tc_count; spin_unlock(&cifs_tcp_ses_lock); -- 2.26.0