[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250922082417.816331-1-rajasimandalos@gmail.com>
Date: Mon, 22 Sep 2025 08:24:16 +0000
From: rajasimandalos@...il.com
To: linux-cifs@...r.kernel.org
Cc: sfrench@...ba.org,
pc@...guebit.org,
ronniesahlberg@...il.com,
sprasad@...rosoft.com,
tom@...pey.com,
bharathsm@...rosoft.com,
linux-kernel@...r.kernel.org,
Rajasi Mandal <rajasimandal@...rosoft.com>
Subject: [PATCH 1/2] cifs: client: force multichannel=off when max_channels=1
From: Rajasi Mandal <rajasimandal@...rosoft.com>
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 <rajasimandal@...rosoft.com>
---
fs/smb/client/fs_context.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/fs/smb/client/fs_context.c b/fs/smb/client/fs_context.c
index 072383899e81..43552b44f613 100644
--- a/fs/smb/client/fs_context.c
+++ b/fs/smb/client/fs_context.c
@@ -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:
--
2.43.0
Powered by blists - more mailing lists