diff options
author | 2020-06-26 12:58:09 -0700 | |
---|---|---|
committer | 2020-07-24 16:24:27 -0400 | |
commit | 16613492ebe5cfe5cc589efa1dfff142c05d0ba0 (patch) | |
tree | 0278b179a98938cde0e24809025bc17cee1a0113 | |
parent | 17f1a02a56a37db7bfdce23f113a5b4d0c8541c0 (diff) | |
download | linux-yocto-16613492ebe5cfe5cc589efa1dfff142c05d0ba0.tar.gz linux-yocto-16613492ebe5cfe5cc589efa1dfff142c05d0ba0.tar.bz2 linux-yocto-16613492ebe5cfe5cc589efa1dfff142c05d0ba0.zip |
SMB3: Honor 'posix' flag for multiuser mounts
commit 5391b8e1b7b7e5cfa2dd4ffdc4b8c6b64dfd1866 upstream.
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: ce558b0e17f8 ("smb3: Add posix create context for smb3.11 posix mounts")
Fixes: b326614ea215 ("smb3: allow "posix" mount option to enable new SMB311 protocol extensions")
Signed-off-by: Paul Aurich <paul@darkrain42.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Reviewed-by: Aurelien Aptel <aaptel@suse.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r-- | fs/cifs/connect.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 7e49c56c1863..a0e230d6f592 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -5173,6 +5173,7 @@ cifs_construct_tcon(struct cifs_sb_info *cifs_sb, kuid_t fsuid) vol_info->local_lease = master_tcon->local_lease; vol_info->no_lease = master_tcon->no_lease; vol_info->no_linux_ext = !master_tcon->unix_ext; + vol_info->linux_ext = master_tcon->posix_extensions; vol_info->sectype = master_tcon->ses->sectype; vol_info->sign = master_tcon->ses->sign; @@ -5200,10 +5201,6 @@ cifs_construct_tcon(struct cifs_sb_info *cifs_sb, kuid_t fsuid) goto out; } - /* if new SMB3.11 POSIX extensions are supported do not remap / and \ */ - if (tcon->posix_extensions) - cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_POSIX_PATHS; - if (cap_unix(ses)) reset_cifs_unix_caps(0, tcon, NULL, vol_info); |