From: Jeff Layton <jlayton@kernel.org>
To: NeilBrown <neilb@suse.de>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Christian Brauner <brauner@kernel.org>
Cc: Chuck Lever <chuck.lever@oracle.com>,
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 07:47:33 -0500 [thread overview]
Message-ID: <df0efa15ee231a8c204423bbc6c3e005c49fb6fe.camel@kernel.org> (raw)
In-Reply-To: <20250226062135.2043651-3-neilb@suse.de>
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>
next prev parent reply other threads:[~2025-02-26 12:47 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 [this message]
2025-02-26 14:15 ` Chuck Lever
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=df0efa15ee231a8c204423bbc6c3e005c49fb6fe.camel@kernel.org \
--to=jlayton@kernel.org \
--cc=anna@kernel.org \
--cc=brauner@kernel.org \
--cc=chuck.lever@oracle.com \
--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