Skip to content

Commit cda88d2

Browse files
Dan CarpenterSteve French
authored andcommitted
cifs: unlock on error in smb3_reconfigure()
Unlock before returning if smb3_sync_session_ctx_passwords() fails. Fixes: 7e654ab ("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>
1 parent 0f0e357 commit cda88d2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

fs/smb/client/fs_context.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1008,8 +1008,10 @@ static int smb3_reconfigure(struct fs_context *fc)
10081008
* later stage
10091009
*/
10101010
rc = smb3_sync_session_ctx_passwords(cifs_sb, ses);
1011-
if (rc)
1011+
if (rc) {
1012+
mutex_unlock(&ses->session_mutex);
10121013
return rc;
1014+
}
10131015

10141016
/*
10151017
* now that allocations for passwords are done, commit them

0 commit comments

Comments
 (0)