afs: dget_parent() can't return a negative dentry
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 29 Sep 2013 20:29:04 +0000 (16:29 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 30 Sep 2013 02:02:24 +0000 (22:02 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/afs/dir.c

index 646337dc5201e702227309cc17db99f96af99173..529300327f4574d2dc36345be3c7398442548e08 100644 (file)
@@ -600,9 +600,6 @@ static int afs_d_revalidate(struct dentry *dentry, unsigned int flags)
 
        /* lock down the parent dentry so we can peer at it */
        parent = dget_parent(dentry);
-       if (!parent->d_inode)
-               goto out_bad;
-
        dir = AFS_FS_I(parent->d_inode);
 
        /* validate the parent directory */