minix: remove unnecessary dentry_unhash on rmdir, dir rename
authorSage Weil <sage@newdream.net>
Fri, 27 May 2011 20:42:16 +0000 (13:42 -0700)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 28 May 2011 05:02:54 +0000 (01:02 -0400)
Minix has no issues with references to unlinked directories.

Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/minix/namei.c

index f60aed8..6e6777f 100644 (file)
@@ -168,8 +168,6 @@ static int minix_rmdir(struct inode * dir, struct dentry *dentry)
        struct inode * inode = dentry->d_inode;
        int err = -ENOTEMPTY;
 
-       dentry_unhash(dentry);
-
        if (minix_empty_dir(inode)) {
                err = minix_unlink(dir, dentry);
                if (!err) {
@@ -192,9 +190,6 @@ static int minix_rename(struct inode * old_dir, struct dentry *old_dentry,
        struct minix_dir_entry * old_de;
        int err = -ENOENT;
 
-       if (new_inode && S_ISDIR(new_inode->i_mode))
-               dentry_unhash(new_dentry);
-
        old_de = minix_find_entry(old_dentry, &old_page);
        if (!old_de)
                goto out;