From 4afacc9d804dbc3ecad555fddd6e5f81ed34bb86 Mon Sep 17 00:00:00 2001 From: Michael Kelly Date: Sun, 13 Jul 2025 12:44:48 +0200 Subject: nfs: Fixes netfs_attempt_create_file() unlocking for unlikely case of RPC init failure and processing of v3 reply --- nfs/ops.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'nfs/ops.c') 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); -- cgit v1.2.3