summaryrefslogtreecommitdiff
path: root/fs/smb/client/file.c
diff options
context:
space:
mode:
authorShyam Prasad N <sprasad@microsoft.com>2024-02-06 15:00:46 +0000
committerSteve French <stfrench@microsoft.com>2024-02-09 14:43:23 -0600
commitc6e02eefd6ace3da3369c764f15429f5647056af (patch)
treeacbd8039c464288f46b498353727f0900435fbed /fs/smb/client/file.c
parent55c7788c37242702868bfac7861cdf0c358d6c3d (diff)
cifs: change tcon status when need_reconnect is set on it
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>
Diffstat (limited to 'fs/smb/client/file.c')
-rw-r--r--fs/smb/client/file.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/smb/client/file.c b/fs/smb/client/file.c
index b75282c204da..f391c9b803d8 100644
--- a/fs/smb/client/file.c
+++ b/fs/smb/client/file.c
@@ -175,6 +175,9 @@ cifs_mark_open_files_invalid(struct cifs_tcon *tcon)
/* only send once per connect */
spin_lock(&tcon->tc_lock);
+ if (tcon->need_reconnect)
+ tcon->status = TID_NEED_RECON;
+
if (tcon->status != TID_NEED_RECON) {
spin_unlock(&tcon->tc_lock);
return;