cifs: set correct tcon status after initial tree connect
authorPaulo Alcantara <pc@cjr.nz>
Tue, 13 Dec 2022 12:15:23 +0000 (09:15 -0300)
committerSteve French <stfrench@microsoft.com>
Fri, 16 Dec 2022 00:37:18 +0000 (18:37 -0600)
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>
fs/cifs/connect.c

index e80252a83225717b9d7bbb9b504d2042f91f8f32..eda75c99a0f57d9c4b5d1872a786fa204239db30 100644 (file)
@@ -2600,6 +2600,7 @@ cifs_get_tcon(struct cifs_ses *ses, struct smb3_fs_context *ctx)
        tcon->nodelete = ctx->nodelete;
        tcon->local_lease = ctx->local_lease;
        INIT_LIST_HEAD(&tcon->pending_opens);
+       tcon->status = TID_GOOD;
 
        /* schedule query interfaces poll */
        INIT_DELAYED_WORK(&tcon->query_interfaces,