cifs: fix wrong unlock before return from cifs_tree_connect()

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>
This commit is contained in:
Yang Yingliang 2022-07-29 15:49:35 +08:00 committed by Steve French
parent d7d7a66aac
commit aea02fc40a

View 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;