Skip to content

Commit

Permalink
smb3: if max_channels set to more than one channel request multichannel
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-By: Tom Talpey <[email protected]>
Cc: <[email protected]> # v5.11+
Reviewed-by: Shyam Prasad N <[email protected]>
  • Loading branch information
Steve French committed May 8, 2021
1 parent 9c2dc11 commit c1f8a39
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fs/cifs/fs_context.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c1f8a39

Please sign in to comment.