summaryrefslogtreecommitdiffstats
path: root/fs/cifs/connect.c
diff options
context:
space:
mode:
authorPaulo Alcantara <pc@cjr.nz>2020-08-27 16:20:19 +0200
committerSteve French <stfrench@microsoft.com>2020-08-28 19:27:33 +0200
commite183785f2529b4135f00a0330a3b08e7c86530c8 (patch)
treefe00d92dac0b5e746b2a555f0590ba65aec21c0c /fs/cifs/connect.c
parentLinux 5.9-rc2 (diff)
downloadlinux-e183785f2529b4135f00a0330a3b08e7c86530c8.tar.xz
linux-e183785f2529b4135f00a0330a3b08e7c86530c8.zip
cifs: fix check of tcon dfs in smb1
For SMB1, the DFS flag should be checked against tcon->Flags rather than tcon->share_flags. While at it, add an is_tcon_dfs() helper to check for DFS capability in a more generic way. Signed-off-by: Paulo Alcantara (SUSE) <pc@cjr.nz> Signed-off-by: Steve French <stfrench@microsoft.com> Reviewed-by: Shyam Prasad N <nspmangalore@gmail.com>
Diffstat (limited to '')
-rw-r--r--fs/cifs/connect.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index a275ee399dce..392c44d64d8a 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -4909,7 +4909,7 @@ int cifs_mount(struct cifs_sb_info *cifs_sb, struct smb_vol *vol)
if (!tcon)
continue;
/* Make sure that requests go through new root servers */
- if (tcon->share_flags & (SHI1005_FLAGS_DFS | SHI1005_FLAGS_DFS_ROOT)) {
+ if (is_tcon_dfs(tcon)) {
put_root_ses(root_ses);
set_root_ses(cifs_sb, ses, &root_ses);
}