Skip to content

Commit

Permalink
fat: fix d_revalidate oopsen on NFS exports
Browse files Browse the repository at this point in the history
can't blindly check nd->flags in ->d_revalidate()

Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Al Viro committed Mar 10, 2011
1 parent 8ce84ee commit 9177ada
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/fat/namei_vfat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand All @@ -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;

/*
Expand Down

0 comments on commit 9177ada

Please sign in to comment.