Skip to content

Commit 5391b8e

Browse files
darkrain42smfrench
authored andcommitted
SMB3: Honor 'posix' flag for multiuser mounts
The flag from the primary tcon needs to be copied into the volume info so that cifs_get_tcon will try to enable extensions on the per-user tcon. At that point, since posix extensions must have already been enabled on the superblock, don't try to needlessly adjust the mount flags. Fixes: ce558b0 ("smb3: Add posix create context for smb3.11 posix mounts") Fixes: b326614 ("smb3: allow "posix" mount option to enable new SMB311 protocol extensions") Signed-off-by: Paul Aurich <[email protected]> Signed-off-by: Steve French <[email protected]> Reviewed-by: Aurelien Aptel <[email protected]>
1 parent 6b356f6 commit 5391b8e

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

fs/cifs/connect.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5311,6 +5311,7 @@ cifs_construct_tcon(struct cifs_sb_info *cifs_sb, kuid_t fsuid)
53115311
vol_info->persistent = master_tcon->use_persistent;
53125312
vol_info->handle_timeout = master_tcon->handle_timeout;
53135313
vol_info->no_linux_ext = !master_tcon->unix_ext;
5314+
vol_info->linux_ext = master_tcon->posix_extensions;
53145315
vol_info->sectype = master_tcon->ses->sectype;
53155316
vol_info->sign = master_tcon->ses->sign;
53165317
vol_info->seal = master_tcon->seal;
@@ -5339,10 +5340,6 @@ cifs_construct_tcon(struct cifs_sb_info *cifs_sb, kuid_t fsuid)
53395340
goto out;
53405341
}
53415342

5342-
/* if new SMB3.11 POSIX extensions are supported do not remap / and \ */
5343-
if (tcon->posix_extensions)
5344-
cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_POSIX_PATHS;
5345-
53465343
if (cap_unix(ses))
53475344
reset_cifs_unix_caps(0, tcon, NULL, vol_info);
53485345

0 commit comments

Comments
 (0)