vfs: push dentry_unhash on rmdir into file systems
[deliverable/linux.git] / fs / fat / namei_vfat.c
index f88f752babd9c4e2e1054fde3dd7306ec6e457fe..d7b9383bb9c2a4266c13fbfa41a4e719aac84bb5 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;
 
        /*
@@ -824,6 +824,8 @@ static int vfat_rmdir(struct inode *dir, struct dentry *dentry)
        struct fat_slot_info sinfo;
        int err;
 
+       dentry_unhash(dentry);
+
        lock_super(sb);
 
        err = fat_dir_empty(inode);
This page took 0.029618 seconds and 5 git commands to generate.