cifs: double lock in cifs_reconnect_tcon()
authorDan Carpenter <error27@gmail.com>
Thu, 6 Apr 2023 08:55:47 +0000 (11:55 +0300)
committerSteve French <stfrench@microsoft.com>
Fri, 7 Apr 2023 03:45:41 +0000 (22:45 -0500)
This lock was supposed to be an unlock.

Fixes: 6cc041e90c17 ("cifs: avoid races in parallel reconnects in smb1")
Signed-off-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Paulo Alcantara (SUSE) <pc@manguebit.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/cifssmb.c

index 0d30b17494e4ab1db9046052e8a9def4bc3ea93b..9d963caec35c8d07f671aefca26ae1ee9a63a82d 100644 (file)
@@ -120,7 +120,7 @@ again:
        spin_lock(&server->srv_lock);
        if (server->tcpStatus == CifsNeedReconnect) {
                spin_unlock(&server->srv_lock);
-               mutex_lock(&ses->session_mutex);
+               mutex_unlock(&ses->session_mutex);
 
                if (tcon->retry)
                        goto again;