diff options
| author | Dan Carpenter <[email protected]> | 2024-11-15 09:13:58 +0000 |
|---|---|---|
| committer | Steve French <[email protected]> | 2024-11-28 15:51:11 +0000 |
| commit | cda88d2fef7aa7de80b5697e8009fcbbb436f42d (patch) | |
| tree | 7913e1c161bdc51fd5a9f037111167e1b8211b12 | |
| parent | cifs: during remount, make sure passwords are in sync (diff) | |
| download | kernel-cda88d2fef7aa7de80b5697e8009fcbbb436f42d.tar.gz kernel-cda88d2fef7aa7de80b5697e8009fcbbb436f42d.zip | |
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 <[email protected]>
Reviewed-by: Bharath SM <[email protected]>
Signed-off-by: Steve French <[email protected]>
| -rw-r--r-- | fs/smb/client/fs_context.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/smb/client/fs_context.c b/fs/smb/client/fs_context.c index c614c5d8b15e..49123f458d0c 100644 --- a/fs/smb/client/fs_context.c +++ b/fs/smb/client/fs_context.c @@ -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 |
