diff options
author | Shyam Prasad N <sprasad@microsoft.com> | 2022-01-18 12:24:08 +0300 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2022-01-19 20:10:55 +0300 |
commit | 47de760655f329ce4b3d3e6276557220956d8c38 (patch) | |
tree | 8d2a0587a2f45755ed15b8c5f7cc645a4f65137c /fs/cifs/connect.c | |
parent | c1604da708d345a1ca1cf6a5537d503b14aa4787 (diff) | |
download | linux-47de760655f329ce4b3d3e6276557220956d8c38.tar.xz |
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 <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r-- | fs/cifs/connect.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 0a35503b7b46..bcba3324cb4b 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -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); |