public inbox for linux-cifs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH next] cifs: Fix double unlock bug in open_cached_dir()
@ 2025-05-05 14:27 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2025-05-05 14:27 UTC (permalink / raw)
  To: Shyam Prasad N
  Cc: Steve French, Paulo Alcantara, Ronnie Sahlberg, Tom Talpey,
	Bharath SM, linux-cifs, samba-technical, linux-kernel,
	kernel-janitors

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 --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;
 	}
-- 
2.47.2


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2025-05-05 14:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-05 14:27 [PATCH next] cifs: Fix double unlock bug in open_cached_dir() Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox