Message ID | 20250226062135.2043651-3-neilb@suse.de (mailing list archive) |
---|---|
State | Handled Elsewhere |
Headers | show |
Series | prep patches for my mkdir series | expand |
On Wed, 2025-02-26 at 17:18 +1100, NeilBrown wrote: > 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> > --- > fs/nfsd/vfs.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c > index 29cb7b812d71..1035010f1198 100644 > --- a/fs/nfsd/vfs.c > +++ b/fs/nfsd/vfs.c > @@ -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: Not really related to 1/2 but ok. Reviewed-by: Jeff Layton <jlayton@kernel.org>
On 2/26/25 1:18 AM, NeilBrown wrote: > 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> > --- > fs/nfsd/vfs.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c > index 29cb7b812d71..1035010f1198 100644 > --- a/fs/nfsd/vfs.c > +++ b/fs/nfsd/vfs.c > @@ -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: Thanks for splitting this out! I was hoping to see a reference to commit 3819bb0d79f5 ("nfsd: vfs_mkdir() might succeed leaving dentry negative unhashed") in the patch description... but reviewers can figure that out themselves. Acked-by: Chuck Lever <chuck.lever@oracle.com>
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index 29cb7b812d71..1035010f1198 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c @@ -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:
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> --- fs/nfsd/vfs.c | 3 --- 1 file changed, 3 deletions(-)