Commit cda88d2f authored by Dan Carpenter's avatar Dan Carpenter Committed by Steve French
Browse files

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: default avatarDan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: default avatarBharath SM <bharathsm@microsoft.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent 0f0e3579
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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