Commit 37e263e6 authored by Rajasi Mandal's avatar Rajasi Mandal Committed by Steve French
Browse files

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: default avatarRajasi Mandal <rajasimandal@microsoft.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent aa12118d
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1820,6 +1820,13 @@ static int smb3_fs_context_parse_param(struct fs_context *fc,
		goto cifs_parse_mount_err;
	}

	/*
	 * Multichannel is not meaningful if max_channels is 1.
	 * Force multichannel to false to ensure consistent configuration.
	 */
	if (ctx->multichannel && ctx->max_channels == 1)
		ctx->multichannel = false;

	return 0;

 cifs_parse_mount_err: