cifs: unlock on error in smb3_reconfigure()

Unlock before returning if smb3_sync_session_ctx_passwords() fails.

Fixes: 7e654ab7da03 ("cifs: during remount, make sure passwords are in sync")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Bharath SM <bharathsm@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
pull/1084/merge
Dan Carpenter 2024-11-15 12:13:58 +03:00 committed by Steve French
parent 0f0e357902
commit cda88d2fef
1 changed files with 3 additions and 1 deletions

View File

@ -1008,8 +1008,10 @@ static int smb3_reconfigure(struct fs_context *fc)
* later stage
*/
rc = smb3_sync_session_ctx_passwords(cifs_sb, ses);
if (rc)
if (rc) {
mutex_unlock(&ses->session_mutex);
return rc;
}
/*
* now that allocations for passwords are done, commit them