vfs: push dentry_unhash on rmdir into file systems
[deliverable/linux.git] / fs / omfs / dir.c
index de4ff29f1e0595c549877d16144064dae9bcbb7a..95ef4433d1a3d1d6ba8efc92be81fed5902c41b6 100644 (file)
@@ -240,8 +240,12 @@ static int omfs_remove(struct inode *dir, struct dentry *dentry)
        struct inode *inode = dentry->d_inode;
        int ret;
 
-       if (S_ISDIR(inode->i_mode) && !omfs_dir_is_empty(inode))
-               return -ENOTEMPTY;
+
+       if (S_ISDIR(inode->i_mode)) {
+               dentry_unhash(dentry);
+               if (!omfs_dir_is_empty(inode))
+                       return -ENOTEMPTY;
+       }
 
        ret = omfs_delete_entry(dentry);
        if (ret)
This page took 0.037359 seconds and 5 git commands to generate.