From: NeilBrown <neilb@suse.de>
To: Alexander Viro <viro@zeniv.linux.org.uk>,
Christian Brauner <brauner@kernel.org>
Cc: Chuck Lever <chuck.lever@oracle.com>,
Jeff Layton <jlayton@kernel.org>,
Trond Myklebust <trondmy@kernel.org>,
Anna Schumaker <anna@kernel.org>,
linux-nfs@vger.kernel.org
Subject: [PATCH 2/2] nfsd: drop fh_update() from S_IFDIR branch of nfsd_create_locked()
Date: Wed, 26 Feb 2025 17:18:32 +1100 [thread overview]
Message-ID: <20250226062135.2043651-3-neilb@suse.de> (raw)
In-Reply-To: <20250226062135.2043651-1-neilb@suse.de>
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:
--
2.48.1
next prev parent reply other threads:[~2025-02-26 6:22 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 ` NeilBrown [this message]
2025-02-26 12:47 ` [PATCH 2/2] nfsd: drop fh_update() from S_IFDIR branch of nfsd_create_locked() Jeff Layton
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=20250226062135.2043651-3-neilb@suse.de \
--to=neilb@suse.de \
--cc=anna@kernel.org \
--cc=brauner@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=jlayton@kernel.org \
--cc=linux-nfs@vger.kernel.org \
--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