Skip to content

Commit

Permalink
cifs: fix wrong unlock before return from cifs_tree_connect()
Browse files Browse the repository at this point in the history
It should unlock 'tcon->tc_lock' before return from cifs_tree_connect().

Fixes: fe67bd5 ("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>
  • Loading branch information
Yang Yingliang authored and Steve French committed Aug 1, 2022
1 parent d7d7a66 commit aea02fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/cifs/connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit aea02fc

Please sign in to comment.