summaryrefslogtreecommitdiff
path: root/fs/nfsd/nfsproc.c
diff options
context:
space:
mode:
authorNeil Brown <neil@brown.name>2025-11-27 11:48:56 +0100
committerChristian Brauner <brauner@kernel.org>2025-11-28 09:51:16 +0100
commiteeec741ee0df36e79a847bb5423f9eef4ed96071 (patch)
treea3b403fe472ec1a2666b7192652052de526fd7b8 /fs/nfsd/nfsproc.c
parent523ac768800c95d34522e8e33775bf911b883fe2 (diff)
nfsd: fix end_creating() conversion
Avoid a double-unlock as nfs_create_locked() will have unlocked the parent and do the dput() manually. Christian Brauner <brauner@kernel.org> says: I've taken Neil's proposed fix from [1] and added a commit message. Fixes: https://lore.kernel.org/202511252132.2c621407-lkp@intel.com [1] Fixes: bd6ede8a06e8 ("VFS/nfsd/cachefiles/ovl: introduce start_removing() and end_removing()") Signed-off-by: Neil Brown <neil@brown.name> Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/nfsd/nfsproc.c')
-rw-r--r--fs/nfsd/nfsproc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfsd/nfsproc.c b/fs/nfsd/nfsproc.c
index 28f03a6a3cc3..481e789a7697 100644
--- a/fs/nfsd/nfsproc.c
+++ b/fs/nfsd/nfsproc.c
@@ -407,6 +407,9 @@ nfsd_proc_create(struct svc_rqst *rqstp)
/* File doesn't exist. Create it and set attrs */
resp->status = nfsd_create_locked(rqstp, dirfhp, &attrs, type,
rdev, newfhp);
+ /* nfsd_create_locked() unlocked the parent */
+ dput(dchild);
+ goto out_write;
} else if (type == S_IFREG) {
dprintk("nfsd: existing %s, valid=%x, size=%ld\n",
argp->name, attr->ia_valid, (long) attr->ia_size);