Skip to content

Commit

Permalink
smb3: fix posix extensions mount option
Browse files Browse the repository at this point in the history
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>
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
Suggested-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
  • Loading branch information
Steve French committed Aug 25, 2021
1 parent d72c741 commit 7321be2
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions fs/cifs/fs_context.c
Original file line number Diff line number Diff line change
Expand Up @@ -1266,10 +1266,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;
Expand Down

0 comments on commit 7321be2

Please sign in to comment.