Skip to content

Commit 53923e0

Browse files
committed
cifs: fix confusing unneeded warning message on smb2.1 and earlier
When mounting with SMB2.1 or earlier, even with nomultichannel, we log the confusing warning message: "CIFS: VFS: multichannel is not supported on this protocol version, use 3.0 or above" Fix this so that we don't log this unless they really are trying to mount with multichannel. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=215608 Reported-by: Kim Scarborough <kim@scarborough.kim> Cc: stable@vger.kernel.org # 5.11+ Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz> Signed-off-by: Steve French <stfrench@microsoft.com>
1 parent 0c6f4eb commit 53923e0

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

fs/cifs/sess.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,6 @@ int cifs_try_adding_channels(struct cifs_sb_info *cifs_sb, struct cifs_ses *ses)
127127
struct cifs_server_iface *ifaces = NULL;
128128
size_t iface_count;
129129

130-
if (ses->server->dialect < SMB30_PROT_ID) {
131-
cifs_dbg(VFS, "multichannel is not supported on this protocol version, use 3.0 or above\n");
132-
return 0;
133-
}
134-
135130
spin_lock(&ses->chan_lock);
136131

137132
new_chan_count = old_chan_count = ses->chan_count;
@@ -145,6 +140,12 @@ int cifs_try_adding_channels(struct cifs_sb_info *cifs_sb, struct cifs_ses *ses)
145140
return 0;
146141
}
147142

143+
if (ses->server->dialect < SMB30_PROT_ID) {
144+
spin_unlock(&ses->chan_lock);
145+
cifs_dbg(VFS, "multichannel is not supported on this protocol version, use 3.0 or above\n");
146+
return 0;
147+
}
148+
148149
if (!(ses->server->capabilities & SMB2_GLOBAL_CAP_MULTI_CHANNEL)) {
149150
ses->chan_max = 1;
150151
spin_unlock(&ses->chan_lock);

0 commit comments

Comments
 (0)