From: Steve French stfrench@microsoft.com
commit c1f8a398b6d661b594556a91224b096d92293061 upstream.
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 Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org --- fs/cifs/fs_context.c | 3 +++ 1 file changed, 3 insertions(+)
--- a/fs/cifs/fs_context.c +++ b/fs/cifs/fs_context.c @@ -999,6 +999,9 @@ static int smb3_fs_context_parse_param(s 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;