NFS: remove unused check for negative dentry
authorBenjamin Coddington <bcodding@redhat.com>
Fri, 13 Sep 2019 12:29:04 +0000 (08:29 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Fri, 20 Sep 2019 19:15:24 +0000 (15:15 -0400)
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>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/dir.c

index d1bbf2f..dd8b218 100644 (file)
@@ -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)