ocfs2: fix d_revalidate oopsen on NFS exports
authorAl Viro <viro@zeniv.linux.org.uk>
Thu, 10 Mar 2011 08:45:07 +0000 (03:45 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 10 Mar 2011 08:45:07 +0000 (03:45 -0500)
can't blindly check nd->flags in ->d_revalidate()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/ocfs2/dcache.c

index 6d80ecc7834f55ff2e7151b38cc6540ad1b08b51..7eb90403fc8af0521b7d3df89d37956ccad054a4 100644 (file)
@@ -56,7 +56,7 @@ static int ocfs2_dentry_revalidate(struct dentry *dentry,
        int ret = 0;    /* if all else fails, just return false */
        struct ocfs2_super *osb;
 
-       if (nd->flags & LOOKUP_RCU)
+       if (nd && nd->flags & LOOKUP_RCU)
                return -ECHILD;
 
        inode = dentry->d_inode;