diff options
author | Shyam Prasad N <sprasad@microsoft.com> | 2022-01-17 07:15:02 +0000 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2022-01-19 11:10:58 -0600 |
commit | ba978e83255a759a4a07257a46ca6396a8b81787 (patch) | |
tree | 2fdef096adf237a622e37b52e19a42f19be92e0b /fs/cifs/netmisc.c | |
parent | 47de760655f329ce4b3d3e6276557220956d8c38 (diff) | |
download | linux-ba978e83255a759a4a07257a46ca6396a8b81787.tar.bz2 |
cifs: cifs_ses_mark_for_reconnect should also update reconnect bits
Recent restructuring of cifs_reconnect introduced a helper func
named cifs_ses_mark_for_reconnect, which updates the state of tcp
session for all the channels of a session for reconnect.
However, this does not update the session state and chans_need_reconnect
bitmask. This change fixes that.
Also, cifs_mark_tcp_sess_for_reconnect should mark set the bitmask
for all channels when the whole session is marked for reconnect.
Fixed that here too.
Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/netmisc.c')
-rw-r--r-- | fs/cifs/netmisc.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/cifs/netmisc.c b/fs/cifs/netmisc.c index 43b16b6d108c..ebe236b9d9f5 100644 --- a/fs/cifs/netmisc.c +++ b/fs/cifs/netmisc.c @@ -896,10 +896,7 @@ map_and_check_smb_error(struct mid_q_entry *mid, bool logErr) if (class == ERRSRV && code == ERRbaduid) { cifs_dbg(FYI, "Server returned 0x%x, reconnecting session...\n", code); - spin_lock(&cifs_tcp_ses_lock); - if (mid->server->tcpStatus != CifsExiting) - mid->server->tcpStatus = CifsNeedReconnect; - spin_unlock(&cifs_tcp_ses_lock); + cifs_reconnect(mid->server, false); } } |