ubifs: remove unnecessary dentry_unhash from rmdir, dir rename
authorSage Weil <sage@newdream.net>
Fri, 27 May 2011 20:42:00 +0000 (13:42 -0700)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 28 May 2011 05:02:51 +0000 (01:02 -0400)
ubifs does not have problems with references to unlinked directories.

CC: Artem Bityutskiy <dedekind1@gmail.com>
CC: Adrian Hunter <adrian.hunter@nokia.com>
CC: linux-mtd@lists.infradead.org
Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/ubifs/dir.c

index c2b80943560d6f9516468903a9847ae5089e28f8..ef5abd38f0bf32a90f30ef6994c81b6d864f93e8 100644 (file)
@@ -656,8 +656,6 @@ static int ubifs_rmdir(struct inode *dir, struct dentry *dentry)
        struct ubifs_inode *dir_ui = ubifs_inode(dir);
        struct ubifs_budget_req req = { .mod_dent = 1, .dirtied_ino = 2 };
 
-       dentry_unhash(dentry);
-
        /*
         * Budget request settings: deletion direntry, deletion inode and
         * changing the parent inode. If budgeting fails, go ahead anyway
@@ -978,9 +976,6 @@ static int ubifs_rename(struct inode *old_dir, struct dentry *old_dentry,
                        .dirtied_ino_d = ALIGN(old_inode_ui->data_len, 8) };
        struct timespec time;
 
-       if (new_inode && S_ISDIR(new_inode->i_mode))
-               dentry_unhash(new_dentry);
-
        /*
         * Budget request settings: deletion direntry, new direntry, removing
         * the old inode, and changing old and new parent directory inodes.