[3/3] NFS: remove unused check for negative dentry
diff mbox series

Message ID 34f99243d118543593cf82d5862065fd037c58e7.1568377101.git.bcodding@redhat.com
State New
Headers show
Series
  • Untitled series #173833
Related show

Commit Message

Benjamin Coddington Sept. 13, 2019, 12:29 p.m. UTC
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(-)

Patch
diff mbox series

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)