Skip to content

Commit 37e263e

Browse files
rajasi3010smfrench
authored andcommitted
cifs: client: force multichannel=off when max_channels=1
Previously, specifying both multichannel and max_channels=1 as mount options would leave multichannel enabled, even though it is not meaningful when only one channel is allowed. This led to confusion and inconsistent behavior, as the client would advertise multichannel capability but never establish secondary channels. Fix this by forcing multichannel to false whenever max_channels=1, ensuring the mount configuration is consistent and matches user intent. This prevents the client from advertising or attempting multichannel support when it is not possible. Signed-off-by: Rajasi Mandal <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent aa12118 commit 37e263e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

fs/smb/client/fs_context.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1820,6 +1820,13 @@ static int smb3_fs_context_parse_param(struct fs_context *fc,
18201820
goto cifs_parse_mount_err;
18211821
}
18221822

1823+
/*
1824+
* Multichannel is not meaningful if max_channels is 1.
1825+
* Force multichannel to false to ensure consistent configuration.
1826+
*/
1827+
if (ctx->multichannel && ctx->max_channels == 1)
1828+
ctx->multichannel = false;
1829+
18231830
return 0;
18241831

18251832
cifs_parse_mount_err:

0 commit comments

Comments
 (0)