]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
cifs: avoid redundant calls to disable multichannel
authorShyam Prasad N <sprasad@microsoft.com>
Thu, 1 Feb 2024 11:15:26 +0000 (11:15 +0000)
committerSteve French <stfrench@microsoft.com>
Thu, 1 Feb 2024 18:10:57 +0000 (12:10 -0600)
When the server reports query network interface info call
as unsupported following a tree connect, it means that
multichannel is unsupported, even if the server capabilities
report otherwise.

When this happens, cifs_chan_skip_or_disable is called to
disable multichannel on the client. However, we only need
to call this when multichannel is currently setup.

Fixes: f591062bdbf4 ("cifs: handle servers that still advertise multichannel after disabling")
Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/smb2pdu.c

index 6db54c6ef5719e1cf9cf8a86846f0589d816d037..e257b10bc820249d0e909320e2f4e67f94a4d2bf 100644 (file)
@@ -419,7 +419,7 @@ skip_sess_setup:
                rc = SMB3_request_interfaces(xid, tcon, false);
                free_xid(xid);
 
-               if (rc == -EOPNOTSUPP) {
+               if (rc == -EOPNOTSUPP && ses->chan_count > 1) {
                        /*
                         * some servers like Azure SMB server do not advertise
                         * that multichannel has been disabled with server