summaryrefslogtreecommitdiffstats
path: root/fs/cifs/smb2pdu.c
diff options
context:
space:
mode:
authorShyam Prasad N <sprasad@microsoft.com>2022-03-30 09:22:20 +0000
committerSteve French <stfrench@microsoft.com>2022-05-24 14:08:25 -0500
commit1a6a41d4cedd9b302e2200e6f0e3c44dbbe13689 (patch)
tree2a5b6208b361b2b246b2f309ffec61136ef5f145 /fs/cifs/smb2pdu.c
parent52832252dded19e291a7b8842542ea61d1765f2f (diff)
downloadlinux-stable-1a6a41d4cedd9b302e2200e6f0e3c44dbbe13689.tar.gz
linux-stable-1a6a41d4cedd9b302e2200e6f0e3c44dbbe13689.tar.bz2
linux-stable-1a6a41d4cedd9b302e2200e6f0e3c44dbbe13689.zip
cifs: do not use tcpStatus after negotiate completes
Recent changes to multichannel to allow channel reconnects to work in parallel and independent of each other did so by making use of tcpStatus for the connection, and status for the session. However, this did not take into account the multiuser scenario, where same connection is used by multiple connections. However, tcpStatus should be tracked only till the end of negotiate exchange, and not used for session setup. This change fixes this. Signed-off-by: Shyam Prasad N <sprasad@microsoft.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/smb2pdu.c')
-rw-r--r--fs/cifs/smb2pdu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
index 1b7ad0c09566..f5321a3500f3 100644
--- a/fs/cifs/smb2pdu.c
+++ b/fs/cifs/smb2pdu.c
@@ -3899,7 +3899,8 @@ SMB2_echo(struct TCP_Server_Info *server)
cifs_dbg(FYI, "In echo request for conn_id %lld\n", server->conn_id);
spin_lock(&cifs_tcp_ses_lock);
- if (server->tcpStatus == CifsNeedNegotiate) {
+ if (server->ops->need_neg &&
+ server->ops->need_neg(server)) {
spin_unlock(&cifs_tcp_ses_lock);
/* No need to send echo on newly established connections */
mod_delayed_work(cifsiod_wq, &server->reconnect, 0);