Skip to content

Commit

Permalink
jffs2: remove unnecessary dentry_unhash from rmdir, dir rename
Browse files Browse the repository at this point in the history
jffs2 does not have problems with references to unlinked directories.

CC: David Woodhouse <dwmw2@infradead.org>
CC: linux-mtd@lists.infradead.org
Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Sage Weil authored and Al Viro committed May 28, 2011
1 parent 873ae4d commit cf0f053
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions fs/jffs2/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -609,8 +609,6 @@ static int jffs2_rmdir (struct inode *dir_i, struct dentry *dentry)
int ret;
uint32_t now = get_seconds();

dentry_unhash(dentry);

for (fd = f->dents ; fd; fd = fd->next) {
if (fd->ino)
return -ENOTEMPTY;
Expand Down Expand Up @@ -786,9 +784,6 @@ static int jffs2_rename (struct inode *old_dir_i, struct dentry *old_dentry,
uint8_t type;
uint32_t now;

if (new_dentry->d_inode && S_ISDIR(new_dentry->d_inode->i_mode))
dentry_unhash(new_dentry);

/* The VFS will check for us and prevent trying to rename a
* file over a directory and vice versa, but if it's a directory,
* the VFS can't check whether the victim is empty. The filesystem
Expand Down

0 comments on commit cf0f053

Please sign in to comment.