aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2011-03-10 03:45:49 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2011-03-10 03:45:49 -0500
commit9177ada99d5e69fe91950b3ef5c23f2bcd109987 (patch)
tree4de42636f1c2dd2f6a230d48c6c5ef507026ec7c
parent8ce84eeb5b40da21f20174dd25891a8409534237 (diff)
fat: fix d_revalidate oopsen on NFS exports
can't blindly check nd->flags in ->d_revalidate() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--fs/fat/namei_vfat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/fat/namei_vfat.c b/fs/fat/namei_vfat.c
index f88f752babd..adae3fb7451 100644
--- a/fs/fat/namei_vfat.c
+++ b/fs/fat/namei_vfat.c
@@ -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;
/*