Skip to content

Commit 47de760

Browse files
sprasad-microsoftSteve French
authored andcommitted
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: Shyam Prasad N <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent c1604da commit 47de760

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

fs/cifs/connect.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3908,7 +3908,7 @@ cifs_setup_session(const unsigned int xid, struct cifs_ses *ses,
39083908
spin_unlock(&cifs_tcp_ses_lock);
39093909
return 0;
39103910
}
3911-
ses->status = CifsInSessSetup;
3911+
server->tcpStatus = CifsInSessSetup;
39123912
spin_unlock(&cifs_tcp_ses_lock);
39133913

39143914
spin_lock(&ses->chan_lock);
@@ -3946,8 +3946,7 @@ cifs_setup_session(const unsigned int xid, struct cifs_ses *ses,
39463946
if (server->tcpStatus == CifsInSessSetup)
39473947
server->tcpStatus = CifsGood;
39483948
/* Even if one channel is active, session is in good state */
3949-
if (ses->status == CifsInSessSetup)
3950-
ses->status = CifsGood;
3949+
ses->status = CifsGood;
39513950
spin_unlock(&cifs_tcp_ses_lock);
39523951

39533952
spin_lock(&ses->chan_lock);

0 commit comments

Comments
 (0)