]> git.baikalelectronics.ru Git - kernel.git/commitdiff
cifs: fix wrong unlock before return from cifs_tree_connect()
authorYang Yingliang <yangyingliang@huawei.com>
Fri, 29 Jul 2022 07:49:35 +0000 (15:49 +0800)
committerSteve French <stfrench@microsoft.com>
Mon, 1 Aug 2022 06:34:45 +0000 (01:34 -0500)
It should unlock 'tcon->tc_lock' before return from cifs_tree_connect().

Fixes: fe67bd563ec2 ("cifs: avoid use of global locks for high contention data")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/connect.c

index 931d4b6fafc857d830ec61b7275669840742d3db..1362210f3ece1e92793fa7d05f1a3a37b8ffbba4 100644 (file)
@@ -4583,7 +4583,7 @@ int cifs_tree_connect(const unsigned int xid, struct cifs_tcon *tcon, const stru
        if (tcon->ses->ses_status != SES_GOOD ||
            (tcon->status != TID_NEW &&
            tcon->status != TID_NEED_TCON)) {
-               spin_unlock(&tcon->ses->ses_lock);
+               spin_unlock(&tcon->tc_lock);
                return 0;
        }
        tcon->status = TID_IN_TCON;