diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2011-03-10 03:45:49 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-03-10 03:45:49 -0500 |
commit | 9177ada99d5e69fe91950b3ef5c23f2bcd109987 (patch) | |
tree | 4de42636f1c2dd2f6a230d48c6c5ef507026ec7c /fs/fat | |
parent | 8ce84eeb5b40da21f20174dd25891a8409534237 (diff) | |
download | op-kernel-dev-9177ada99d5e69fe91950b3ef5c23f2bcd109987.zip op-kernel-dev-9177ada99d5e69fe91950b3ef5c23f2bcd109987.tar.gz |
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>
Diffstat (limited to 'fs/fat')
-rw-r--r-- | fs/fat/namei_vfat.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/fat/namei_vfat.c b/fs/fat/namei_vfat.c index f88f752..adae3fb 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; /* |