From: Christoph Hellwig <hch@lst.de>
To: trond.myklebust@primarydata.com
Cc: jlayton@poochiereds.net, linux-nfs@vger.kernel.org
Subject: [PATCH 1/4] nfs: replace d_add with d_splice_alias in atomic_open
Date: Tue, 27 Jun 2017 08:44:00 -0700 [thread overview]
Message-ID: <20170627154403.20944-2-hch@lst.de> (raw)
In-Reply-To: <20170627154403.20944-1-hch@lst.de>
From: Peng Tao <tao.peng@primarydata.com>
It's a trival change but follows knfsd export document that asks
for d_splice_alias during lookup.
Signed-off-by: Peng Tao <tao.peng@primarydata.com>
---
fs/nfs/dir.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 32ccd7754f8a..0296c06dcdc5 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -1512,7 +1512,7 @@ int nfs_atomic_open(struct inode *dir, struct dentry *dentry,
d_drop(dentry);
switch (err) {
case -ENOENT:
- d_add(dentry, NULL);
+ d_splice_alias(NULL, dentry);
nfs_set_verifier(dentry, nfs_save_change_attribute(dir));
break;
case -EISDIR:
--
2.11.0
next prev parent reply other threads:[~2017-06-27 15:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-27 15:43 open by handle support for NFS Christoph Hellwig
2017-06-27 15:44 ` Christoph Hellwig [this message]
2017-06-27 15:44 ` [PATCH 2/4] nfs: add a nfs_ilookup helper Christoph Hellwig
2017-06-27 15:44 ` [PATCH 3/4] nfs4: add NFSv4 LOOKUPP handlers Christoph Hellwig
2017-06-28 14:55 ` Anna Schumaker
2017-06-28 15:13 ` J. Bruce Fields
2017-06-28 15:17 ` Anna Schumaker
2017-06-28 15:22 ` J. Bruce Fields
2017-06-28 16:45 ` Christoph Hellwig
2017-06-28 17:30 ` J. Bruce Fields
2017-06-27 15:44 ` [PATCH 4/4] nfs: add export operations Christoph Hellwig
-- strict thread matches above, loose matches on Subject: below --
2017-06-29 13:34 open by handle support for NFS V2 Christoph Hellwig
2017-06-29 13:34 ` [PATCH 1/4] nfs: replace d_add with d_splice_alias in atomic_open Christoph Hellwig
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=20170627154403.20944-2-hch@lst.de \
--to=hch@lst.de \
--cc=jlayton@poochiereds.net \
--cc=linux-nfs@vger.kernel.org \
--cc=trond.myklebust@primarydata.com \
/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