Blob Blame History Raw
From: Paulo Alcantara <pc@cjr.nz>
Date: Tue, 13 Dec 2022 09:15:23 -0300
Subject: [PATCH] cifs: set correct tcon status after initial tree connect
Git-commit: b248586a49a7729f73c504b1e7b958caea45e927
References: bsc#1190317
Patch-mainline: v6.2-rc1

cifs_tcon::status wasn't correctly updated to TID_GOOD after initial
tree connect thus staying at TID_NEW as long as it was connected.

Cc: stable@vger.kernel.org
Signed-off-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Steve French <stfrench@microsoft.com>
Acked-by: Enzo Matsumiya <ematsumiya@suse.de>
---
 fs/cifs/connect.c |    1 +
 1 file changed, 1 insertion(+)

--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -3788,6 +3788,7 @@ cifs_get_tcon(struct cifs_ses *ses, stru
 	tcon->nodelete = volume_info->nodelete;
 	tcon->local_lease = volume_info->local_lease;
 	INIT_LIST_HEAD(&tcon->pending_opens);
+	tcon->tidStatus = CifsGood;
 
 	spin_lock(&cifs_tcp_ses_lock);
 	list_add(&tcon->tcon_list, &ses->tcon_list);