From 16fcf9422d70cb28056518b30c377fe88a7ad7b9 Mon Sep 17 00:00:00 2001 From: Steve French Date: Fri, 7 May 2021 19:33:51 -0500 Subject: [PATCH 2/4] 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 --- fs/cifs/fs_context.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/cifs/fs_context.c b/fs/cifs/fs_context.c index 3bcf881c3ae9..8f7af6fcdc76 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 ((ctx->multichannel == false) && (result.uint_32 > 1)) + ctx->multichannel = true; break; case Opt_handletimeout: ctx->handle_timeout = result.uint_32; -- 2.27.0