]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
fat: fix d_revalidate oopsen on NFS exports
authorAl Viro <viro@zeniv.linux.org.uk>
Thu, 10 Mar 2011 08:45:49 +0000 (03:45 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 10 Mar 2011 08:45:49 +0000 (03:45 -0500)
can't blindly check nd->flags in ->d_revalidate()

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

index f88f752babd9c4e2e1054fde3dd7306ec6e457fe..adae3fb7451aa52670d07fdf34381defe133e73a 100644 (file)
@@ -43,7 +43,7 @@ static int vfat_revalidate_shortname(struct dentry *dentry)
 
 static int vfat_revalidate(struct dentry *dentry, struct nameidata *nd)
 {
-       if (nd->flags & LOOKUP_RCU)
+       if (nd && nd->flags & LOOKUP_RCU)
                return -ECHILD;
 
        /* This is not negative dentry. Always valid. */
@@ -54,7 +54,7 @@ static int vfat_revalidate(struct dentry *dentry, struct nameidata *nd)
 
 static int vfat_revalidate_ci(struct dentry *dentry, struct nameidata *nd)
 {
-       if (nd->flags & LOOKUP_RCU)
+       if (nd && nd->flags & LOOKUP_RCU)
                return -ECHILD;
 
        /*