Commit 47de7606 authored by Shyam Prasad N's avatar Shyam Prasad N Committed by Steve French

cifs: update tcpStatus during negotiate and sess setup

Till the end of SMB session setup, update tcpStatus and
avoid updating session status field. There was a typo in
cifs_setup_session, which caused ses->status to be updated
instead. This was causing issues during reconnect.
Signed-off-by: default avatarShyam Prasad N <sprasad@microsoft.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent c1604da7
......@@ -3908,7 +3908,7 @@ cifs_setup_session(const unsigned int xid, struct cifs_ses *ses,
spin_unlock(&cifs_tcp_ses_lock);
return 0;
}
ses->status = CifsInSessSetup;
server->tcpStatus = CifsInSessSetup;
spin_unlock(&cifs_tcp_ses_lock);
spin_lock(&ses->chan_lock);
......@@ -3946,8 +3946,7 @@ cifs_setup_session(const unsigned int xid, struct cifs_ses *ses,
if (server->tcpStatus == CifsInSessSetup)
server->tcpStatus = CifsGood;
/* Even if one channel is active, session is in good state */
if (ses->status == CifsInSessSetup)
ses->status = CifsGood;
ses->status = CifsGood;
spin_unlock(&cifs_tcp_ses_lock);
spin_lock(&ses->chan_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment