summaryrefslogtreecommitdiff
path: root/fs/cifs/fs_context.c
diff options
context:
space:
mode:
authorSteve French <stfrench@microsoft.com>2021-05-08 03:33:51 +0300
committerSteve French <stfrench@microsoft.com>2021-05-08 18:51:06 +0300
commitc1f8a398b6d661b594556a91224b096d92293061 (patch)
tree4cf51dc147147f4b3630305dd9bbde66e2abfe21 /fs/cifs/fs_context.c
parent9c2dc11df50d1c8537075ff6b98472198e24438e (diff)
downloadlinux-c1f8a398b6d661b594556a91224b096d92293061.tar.xz
smb3: if max_channels set to more than one channel request multichannel
Mounting with "multichannel" is obviously implied if user requested more than one channel on mount (ie mount parm max_channels>1). Currently both have to be specified. Fix that so that if max_channels is greater than 1 on mount, enable multichannel rather than silently falling back to non-multichannel. Signed-off-by: Steve French <stfrench@microsoft.com> Reviewed-By: Tom Talpey <tom@talpey.com> Cc: <stable@vger.kernel.org> # v5.11+ Reviewed-by: Shyam Prasad N <sprasad@microsoft.com>
Diffstat (limited to 'fs/cifs/fs_context.c')
-rw-r--r--fs/cifs/fs_context.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/cifs/fs_context.c b/fs/cifs/fs_context.c
index 3bcf881c3ae9..5d21cd905315 100644
--- a/fs/cifs/fs_context.c
+++ b/fs/cifs/fs_context.c
@@ -1021,6 +1021,9 @@ static int smb3_fs_context_parse_param(struct fs_context *fc,
goto cifs_parse_mount_err;
}
ctx->max_channels = result.uint_32;
+ /* If more than one channel requested ... they want multichan */
+ if (result.uint_32 > 1)
+ ctx->multichannel = true;
break;
case Opt_handletimeout:
ctx->handle_timeout = result.uint_32;