summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Kelly <mike@weatherwax.co.uk>2025-07-14 17:55:06 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2025-07-14 17:55:06 +0200
commitdaaf662e2b5225882f0e072044f726549590e468 (patch)
tree146647e2338fb90fc459c559758945d92b3b36b7
parentd9233e3096374be846a2cb324b92821828038435 (diff)
nfs: nfs_attempt_lookup() did not unlock mutex on unlikely RPC init failure
-rw-r--r--nfs/ops.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/nfs/ops.c b/nfs/ops.c
index 8dd19e55..90cc9199 100644
--- a/nfs/ops.c
+++ b/nfs/ops.c
@@ -737,7 +737,10 @@ netfs_attempt_lookup (struct iouser *cred, struct node *np,
p = nfs_initialize_rpc (NFSPROC_LOOKUP (protocol_version),
cred, 0, &rpcbuf, np, -1);
if (! p)
- return errno;
+ {
+ pthread_mutex_unlock (&np->lock);
+ return errno;
+ }
p = xdr_encode_fhandle (p, &np->nn->handle);
p = xdr_encode_string (p, name);