summaryrefslogtreecommitdiff
path: root/nfs/ops.c
diff options
context:
space:
mode:
authorMichael Kelly <mike@weatherwax.co.uk>2025-07-13 12:44:48 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2025-07-13 12:44:48 +0200
commit4afacc9d804dbc3ecad555fddd6e5f81ed34bb86 (patch)
treee49fbcb66a01cf4679b931fc9acfc968a4d41f9e /nfs/ops.c
parent24d3d2bded0b13e0f2569c2ce7ada7f883564a68 (diff)
nfs: Fixes netfs_attempt_create_file() unlocking
for unlikely case of RPC init failure and processing of v3 reply
Diffstat (limited to 'nfs/ops.c')
-rw-r--r--nfs/ops.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/nfs/ops.c b/nfs/ops.c
index e4450470..3956cafc 100644
--- a/nfs/ops.c
+++ b/nfs/ops.c
@@ -1251,8 +1251,10 @@ netfs_attempt_create_file (struct iouser *cred, struct node *np,
p = nfs_initialize_rpc (NFSPROC_CREATE (protocol_version),
cred, 0, &rpcbuf, np, -1);
- if (! p)
+ if (! p) {
+ pthread_mutex_unlock (&np->lock);
return errno;
+ }
p = xdr_encode_fhandle (p, &np->nn->handle);
p = xdr_encode_string (p, name);