From: Chuck Lever <chuck.lever@oracle.com>
To: NeilBrown <neilb@suse.de>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Christian Brauner <brauner@kernel.org>
Cc: Jeff Layton <jlayton@kernel.org>,
Trond Myklebust <trondmy@kernel.org>,
Anna Schumaker <anna@kernel.org>,
linux-nfs@vger.kernel.org
Subject: Re: [PATCH 2/2] nfsd: drop fh_update() from S_IFDIR branch of nfsd_create_locked()
Date: Wed, 26 Feb 2025 09:15:57 -0500 [thread overview]
Message-ID: <86e92a5a-2dd4-4954-a0b1-1b61c10fe554@oracle.com> (raw)
In-Reply-To: <20250226062135.2043651-3-neilb@suse.de>
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>
--
Chuck Lever
next prev parent reply other threads:[~2025-02-26 14:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-26 6:18 [PATCH 0/2] prep patches for my mkdir series NeilBrown
2025-02-26 6:18 ` [PATCH 1/2] nfs/vfs: discard d_exact_alias() NeilBrown
2025-02-26 12:46 ` Jeff Layton
2025-02-26 6:18 ` [PATCH 2/2] nfsd: drop fh_update() from S_IFDIR branch of nfsd_create_locked() NeilBrown
2025-02-26 12:47 ` Jeff Layton
2025-02-26 14:15 ` Chuck Lever [this message]
2025-02-26 8:59 ` [PATCH 0/2] prep patches for my mkdir series Christian Brauner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86e92a5a-2dd4-4954-a0b1-1b61c10fe554@oracle.com \
--to=chuck.lever@oracle.com \
--cc=anna@kernel.org \
--cc=brauner@kernel.org \
--cc=jlayton@kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
--cc=trondmy@kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox