cifs: unlock on error in smb3_reconfigure()
BugLink: https://bugs.launchpad.net/bugs/2101915 [ Upstream commit cda88d2fef7aa7de80b5697e8009fcbbb436f42d ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Koichiro Den <koichiro.den@canonical.com> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
This commit is contained in:
committed by
Stefan Bader
parent
551f2723ee
commit
d1fb915034
@@ -946,8 +946,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
|
||||
|
||||
Reference in New Issue
Block a user