linux-cifs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steve French <smfrench@gmail.com>
To: Christian Brauner <christian.brauner@ubuntu.com>
Cc: CIFS <linux-cifs@vger.kernel.org>, Namjae Jeon <namjae.jeon@samsung.com>
Subject: Re: [PATCH][SMB3.1.1] incorrect initialization of the posix extensions in new mount API
Date: Tue, 24 Aug 2021 11:02:35 -0500	[thread overview]
Message-ID: <CAH2r5mtM2tUUsWfUJLbsVJ-y=XKC-wjbS_fuZYpQedte3_O04A@mail.gmail.com> (raw)
In-Reply-To: <20210824115249.gdd3jlf6wi2joxdt@wittgenstein>

[-- Attachment #1: Type: text/plain, Size: 825 bytes --]

Yes - the indentation is just cut-n-paste gmail strangeness - you can
see the proper indentation in the attachment


On Tue, Aug 24, 2021 at 6:52 AM Christian Brauner
<christian.brauner@ubuntu.com> wrote:
>
> On Mon, Aug 23, 2021 at 02:07:22PM -0500, Steve French wrote:
> > We were incorrectly initializing the posix extensions in the
> > conversion to the new mount API.
> >
> > CC: <stable@vger.kernel.org> # 5.11+
> > Reported-by: Christian Brauner <christian.brauner@ubuntu.com>
> > Suggested-by: Namjae Jeon <namjae.jeon@samsung.com>
> > Signed-off-by: Steve French <stfrench@microsoft.com>
> > ---
>
> The indentation looks rather strange to me but maybe that's just mail
> that got garbled. In any case, with the indentation fixed:
>
> Acked-by: Christian Brauner <christian.brauner@ubuntu.com>



-- 
Thanks,

Steve

[-- Attachment #2: 0001-smb3-fix-posix-extensions-mount-option.patch --]
[-- Type: text/x-patch, Size: 1322 bytes --]

From bfb7d1b8806fe8decc977963b9eddbf9c4ced9d5 Mon Sep 17 00:00:00 2001
From: Steve French <stfrench@microsoft.com>
Date: Mon, 23 Aug 2021 13:52:12 -0500
Subject: [PATCH] smb3: fix posix extensions mount option

We were incorrectly initializing the posix extensions in the
conversion to the new mount API.

CC: <stable@vger.kernel.org> # 5.11+
Reported-by: Christian Brauner <christian.brauner@ubuntu.com>
Suggested-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
---
 fs/cifs/fs_context.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/fs/cifs/fs_context.c b/fs/cifs/fs_context.c
index 4515a0883262..3109def8e199 100644
--- a/fs/cifs/fs_context.c
+++ b/fs/cifs/fs_context.c
@@ -1252,10 +1252,17 @@ static int smb3_fs_context_parse_param(struct fs_context *fc,
 			ctx->posix_paths = 1;
 		break;
 	case Opt_unix:
-		if (result.negated)
+		if (result.negated) {
+			if (ctx->linux_ext == 1)
+				pr_warn_once("conflicting posix mount options specified\n");
 			ctx->linux_ext = 0;
-		else
 			ctx->no_linux_ext = 1;
+		} else {
+			if (ctx->no_linux_ext == 1)
+				pr_warn_once("conflicting posix mount options specified\n");
+			ctx->linux_ext = 1;
+			ctx->no_linux_ext = 0;
+		}
 		break;
 	case Opt_nocase:
 		ctx->nocase = 1;
-- 
2.30.2


      reply	other threads:[~2021-08-24 16:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-23 19:07 Steve French
2021-08-24 11:52 ` Christian Brauner
2021-08-24 16:02   ` Steve French [this message]

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='CAH2r5mtM2tUUsWfUJLbsVJ-y=XKC-wjbS_fuZYpQedte3_O04A@mail.gmail.com' \
    --to=smfrench@gmail.com \
    --cc=christian.brauner@ubuntu.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=namjae.jeon@samsung.com \
    --subject='Re: [PATCH][SMB3.1.1] incorrect initialization of the posix extensions in new mount API' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).