From ba978e83255a759a4a07257a46ca6396a8b81787 Mon Sep 17 00:00:00 2001 From: Shyam Prasad N Date: Mon, 17 Jan 2022 07:15:02 +0000 Subject: 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 Signed-off-by: Steve French --- fs/cifs/netmisc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'fs/cifs/netmisc.c') 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); } } -- cgit v1.2.3