cifs: fix wrong unlock before return from cifs_tree_connect()
Subsystems (2)
PATCH 1/1 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 <[email protected]>
--- fs/cifs/connect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/cifs/connect.c +1 -1
@@ -4583,7 +4583,7 @@ int cifs_tree_connect(const unsigned int xid, struct cifs_tcon *tcon, const struif (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 ;
Signature · 1 line
2.25.1
Steve French
Appliedmerged into cifs-2.6.git for-next
Quoted 25 lines · Yang Yingliang
It should unlock '
tcon->tc_lock' before return fromcifs_tree_connect().Fixes fe67bd563ec2 ("cifs: avoid use of global locks for high contention data")Signed-off-by Yang Yingliang <[email protected]>--- fs/cifs/connect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/cifs/connect.c +1
-2@@ -4583,7 +4583,7 @@ int cifs_tree_connect(const unsigned int xid, struct cifs_tcon *tcon, const struif (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 ; --2.25.1
Signature · 3 lines
Thanks, Steve
Quoted 34 lines · Steve French
merged into cifs-2.6.git for-next
Quoted 23 lines · Yang Yingliang
It should unlock '
tcon->tc_lock' before return fromcifs_tree_connect().Fixes fe67bd563ec2 ("cifs: avoid use of global locks for high contention data")Signed-off-by Yang Yingliang <[email protected]>--- fs/cifs/connect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/cifs/connect.c +1
-2@@ -4583,7 +4583,7 @@ int cifs_tree_connect(const unsigned int xid, struct cifs_tcon *tcon, const struif (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 ; --Quoted 2 lines
2.25.1
--
Thanks,
Quoted 1 line
Steve
Good catch. Looks good to me.
Signature · 2 lines
Regards, Shyam