aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve French <[email protected]>2021-08-23 13:52:12 -0500
committerSteve French <[email protected]>2021-08-25 15:43:12 -0500
commit7321be2663da5922343cc121f1ff04924cee2e76 (patch)
treed8e946abaa7cb1b9669fe6fdb1544bbec85c8eca
parentd72c74197b70bc3c95152f351a568007bffa3e11 (diff)
smb3: fix posix extensions mount option
We were incorrectly initializing the posix extensions in the conversion to the new mount API. CC: <[email protected]> # 5.11+ Reported-by: Christian Brauner <[email protected]> Acked-by: Christian Brauner <[email protected]> Suggested-by: Namjae Jeon <[email protected]> Signed-off-by: Steve French <[email protected]>
-rw-r--r--fs/cifs/fs_context.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/fs/cifs/fs_context.c b/fs/cifs/fs_context.c
index eed59bc1d913..727c8835b222 100644
--- a/fs/cifs/fs_context.c
+++ b/fs/cifs/fs_context.c
@@ -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;