From: Yang Yingliang Date: Fri, 29 Jul 2022 07:49:35 +0000 (+0800) Subject: cifs: fix wrong unlock before return from cifs_tree_connect() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=aea02fc40a7fa6ac2c16e3c3a6f1d0fd7e6faaba;p=linux.git 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 Reviewed-by: Shyam Prasad N Signed-off-by: Steve French --- diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 931d4b6fafc85..1362210f3ece1 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -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;