don't do blind d_drop() in nfs_prime_dcache()
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 30 Nov 2012 03:00:51 +0000 (22:00 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 30 Nov 2012 03:00:51 +0000 (22:00 -0500)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/nfs/dir.c

index ce8cb926526bfad79aabe5b8448f80212e1670f9..99489cfca24d29b6f160aa46b69aff82d2d61094 100644 (file)
@@ -450,7 +450,8 @@ void nfs_prime_dcache(struct dentry *parent, struct nfs_entry *entry)
                        nfs_refresh_inode(dentry->d_inode, entry->fattr);
                        goto out;
                } else {
-                       d_drop(dentry);
+                       if (d_invalidate(dentry) != 0)
+                               goto out;
                        dput(dentry);
                }
        }