All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Aurich <paul@darkrain42.org>
To: linux-cifs@vger.kernel.org, sfrench@samba.org
Cc: paul@darkrain42.org
Subject: [PATCH 6/6] SMB3: Honor 'posix' flag for multiuser mounts
Date: Fri, 26 Jun 2020 12:58:09 -0700	[thread overview]
Message-ID: <20200626195809.429507-7-paul@darkrain42.org> (raw)
In-Reply-To: <20200626195809.429507-1-paul@darkrain42.org>

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>
---
 fs/cifs/connect.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index dada6d51e034..a61abde09ffe 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -5311,6 +5311,7 @@ cifs_construct_tcon(struct cifs_sb_info *cifs_sb, kuid_t fsuid)
 	vol_info->persistent = master_tcon->use_persistent;
 	vol_info->handle_timeout = master_tcon->handle_timeout;
 	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;
 	vol_info->seal = master_tcon->seal;
@@ -5339,10 +5340,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);
 
-- 
2.27.0


  parent reply	other threads:[~2020-06-26 20:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-26 19:58 [PATCH 0/6] Various fixes for multiuser SMB mounts Paul Aurich
2020-06-26 19:58 ` [PATCH 1/6] cifs: Display local UID details for SMB sessions in DebugData Paul Aurich
2020-06-26 19:58 ` [PATCH 2/6] SMB3: Honor 'seal' flag for multiuser mounts Paul Aurich
2020-06-26 19:58 ` [PATCH 3/6] SMB3: Honor persistent/resilient handle flags " Paul Aurich
2020-06-26 19:58 ` [PATCH 4/6] SMB3: Honor lease disabling " Paul Aurich
2020-06-26 19:58 ` [PATCH 5/6] SMB3: Honor 'handletimeout' flag " Paul Aurich
2020-06-26 19:58 ` Paul Aurich [this message]
2020-06-29  1:44 ` [PATCH 0/6] Various fixes for multiuser SMB mounts Steve French
2020-06-29  9:39   ` Aurélien Aptel
2020-06-30  2:43     ` Paul Aurich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200626195809.429507-7-paul@darkrain42.org \
    --to=paul@darkrain42.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=sfrench@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.