cifs: after disabling multichannel, mark tcon for reconnect
authorShyam Prasad N <sprasad@microsoft.com>
Fri, 29 Dec 2023 11:30:07 +0000 (11:30 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Feb 2024 00:19:00 +0000 (16:19 -0800)
commit14bafd198066480568967e5fa445ce3a7bbbad98
tree320a7a841ccb9b113e9557a5d04b35b6f79f076c
parentfe8c187fc22f828fdf4b515124d5b8c3e2ec52af
cifs: after disabling multichannel, mark tcon for reconnect

commit 27e1fd343f80168ff456785c2443136b6b7ca3cc upstream.

Once the server disables multichannel for an active multichannel
session, on the following reconnect, the client would reduce
the number of channels to 1. However, it could be the case that
the tree connect was active on one of these disabled channels.
This results in an unrecoverable state.

This change fixes that by making sure that whenever a channel
is being terminated, the session and tcon are marked for
reconnect too. This could mean a few redundant tree connect
calls to the server, but considering that this is not a frequent
event, we should be okay.

Fixes: ee1d21794e55 ("cifs: handle when server stops supporting multichannel")
Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/smb/client/connect.c