diff mbox series

[next] cifs: Fix double unlock bug in open_cached_dir()

Message ID aBjKyIM-OqMBjFNv@stanley.mountain
State New
Headers show
Series [next] cifs: Fix double unlock bug in open_cached_dir() | expand

Commit Message

Dan Carpenter May 5, 2025, 2:27 p.m. UTC
The "goto out;" also does mutex_unlock(&cfid->cfid_mutex) so delete
this duplicate unlock.

Fixes: 62adfb82c199 ("cifs: serialize initialization and cleanup of cfid")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
To be honest I suspect that we're going to have to revert
62adfb82c199 ("cifs: serialize initialization and cleanup of cfid")
instead of fixing it?  So this patch might not be worth applying.

 fs/smb/client/cached_dir.c | 1 -
 1 file changed, 1 deletion(-)
diff mbox series

Patch

diff --git a/fs/smb/client/cached_dir.c b/fs/smb/client/cached_dir.c
index 9e20e3dc2c03..3f4fe1ecdcaf 100644
--- a/fs/smb/client/cached_dir.c
+++ b/fs/smb/client/cached_dir.c
@@ -238,7 +238,6 @@  int open_cached_dir(unsigned int xid, struct cifs_tcon *tcon,
 	 */
 	npath = path_no_prefix(cifs_sb, path);
 	if (IS_ERR(npath)) {
-		mutex_unlock(&cfid->cfid_mutex);
 		rc = PTR_ERR(npath);
 		goto out;
 	}