cifs: change tcon status when need_reconnect is set on it

[ Upstream commit c6e02eefd6 ]

When a tcon is marked for need_reconnect, the intention
is to have it reconnected.

This change adjusts tcon->status in cifs_tree_connect
when need_reconnect is set. Also, this change has a minor
correction in resetting need_reconnect on success. It makes
sure that it is done with tc_lock held.

Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Shyam Prasad N 2024-02-06 15:00:46 +00:00 • committed by Greg Kroah-Hartman
commit cd743cfead
3 changed files with 14 additions and 1 deletions