From: Shyam Prasad N Date: Thu, 1 Feb 2024 11:15:26 +0000 (+0000) Subject: cifs: avoid redundant calls to disable multichannel X-Git-Tag: v6.7.5~115 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7454c0e3ec9ff2d6f12c2bccb4c70389f006ff2e;p=thirdparty%2Fkernel%2Fstable.git cifs: avoid redundant calls to disable multichannel [ Upstream commit e77e15fa5eb1c830597c5ca53ea7af973bae2f78 ] 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 Signed-off-by: Steve French Signed-off-by: Sasha Levin --- diff --git a/fs/smb/client/smb2pdu.c b/fs/smb/client/smb2pdu.c index f5006aa97f5b3..5d9c87d2e1e01 100644 --- a/fs/smb/client/smb2pdu.c +++ b/fs/smb/client/smb2pdu.c @@ -410,7 +410,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