All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Coddington <bcodding@redhat.com>
To: Trond Myklebust <trondmy@gmail.com>,
	Anna Schumaker <Anna.Schumaker@netapp.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>, linux-nfs@vger.kernel.org
Subject: [PATCH 3/3] NFS: remove unused check for negative dentry
Date: Fri, 13 Sep 2019 08:29:04 -0400	[thread overview]
Message-ID: <34f99243d118543593cf82d5862065fd037c58e7.1568377101.git.bcodding@redhat.com> (raw)
In-Reply-To: <cover.1568377101.git.bcodding@redhat.com>

This check has been hanging out since we used to have parallel paths to add
dentry in nfs_create(), but that hasn't been the case for some years.

Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
---
 fs/nfs/dir.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index cb6ee1b41ab5..e180033e35cf 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -1677,15 +1677,11 @@ nfs_add_or_obtain(struct dentry *dentry, struct nfs_fh *fhandle,
 	struct dentry *parent = dget_parent(dentry);
 	struct inode *dir = d_inode(parent);
 	struct inode *inode;
-	struct dentry *d = NULL;
+	struct dentry *d;
 	int error;
 
 	d_drop(dentry);
 
-	/* We may have been initialized further down */
-	if (d_really_is_positive(dentry))
-		goto out;
-
 	if (fhandle->size == 0) {
 		error = NFS_PROTO(dir)->lookup(dir, &dentry->d_name, fhandle, fattr, NULL);
 		if (error)
-- 
2.20.1


      parent reply	other threads:[~2019-09-13 12:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-13 12:29 [PATCH 0/3] nfs_instantiate() might succeed leaving dentry negative unhashed Benjamin Coddington
2019-09-13 12:29 ` [PATCH 1/3] NFS: Refactor nfs_instantiate() for dentry referencing callers Benjamin Coddington
2019-09-13 12:29 ` [PATCH 2/3] NFSv3: use nfs_add_or_obtain() to create and reference inodes Benjamin Coddington
2019-09-13 13:02   ` Benjamin Coddington
2019-09-13 12:29 ` Benjamin Coddington [this message]

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=34f99243d118543593cf82d5862065fd037c58e7.1568377101.git.bcodding@redhat.com \
    --to=bcodding@redhat.com \
    --cc=Anna.Schumaker@netapp.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trondmy@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.