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

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

index 4a45633..0da8da2 100644 (file)
@@ -44,7 +44,7 @@ static int gfs2_drevalidate(struct dentry *dentry, struct nameidata *nd)
        int error;
        int had_lock = 0;
 
-       if (nd->flags & LOOKUP_RCU)
+       if (nd && nd->flags & LOOKUP_RCU)
                return -ECHILD;
 
        parent = dget_parent(dentry);