]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
nfsd: drop fh_update() from S_IFDIR branch of nfsd_create_locked()
authorNeilBrown <neilb@suse.de>
Wed, 26 Feb 2025 06:18:32 +0000 (17:18 +1100)
committerChristian Brauner <brauner@kernel.org>
Wed, 26 Feb 2025 08:55:18 +0000 (09:55 +0100)
nfsd_create_locked() doesn't need to explicitly call fh_update().
On success (which is the only time that fh_update() matters at all),
nfsd_create_setattr() will be called and it will call fh_update().

This extra call is not harmful, but is not necessary.

Signed-off-by: NeilBrown <neilb@suse.de>
Link: https://lore.kernel.org/r/20250226062135.2043651-3-neilb@suse.de
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/nfsd/vfs.c

index 29cb7b812d713c233f4c5c8b3696518f542dfd9c..1035010f1198a1e4300adc1362d9684447dc1e09 100644 (file)
@@ -1505,11 +1505,8 @@ nfsd_create_locked(struct svc_rqst *rqstp, struct svc_fh *fhp,
                        }
                        dput(resfhp->fh_dentry);
                        resfhp->fh_dentry = dget(d);
-                       err = fh_update(resfhp);
                        dput(dchild);
                        dchild = d;
-                       if (err)
-                               goto out;
                }
                break;
        case S_IFCHR: