Skip to content

Commit

Permalink
ocfs2: remove unnecessary dentry_unhash on rmdir/rename_dir
Browse files Browse the repository at this point in the history
Ocfs2 has no issues with lingering references to unlinked directory inodes.

CC: Mark Fasheh <mfasheh@suse.com>
CC: ocfs2-devel@oss.oracle.com
Acked-by: Joel Becker <jlbec@evilplan.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 26, 2011
1 parent 8cbfa53 commit 7ca5736
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions fs/ocfs2/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -810,9 +810,6 @@ static int ocfs2_unlink(struct inode *dir,
(unsigned long long)OCFS2_I(dir)->ip_blkno,
(unsigned long long)OCFS2_I(inode)->ip_blkno);

if (S_ISDIR(inode->i_mode))
dentry_unhash(dentry);

dquot_initialize(dir);

BUG_ON(dentry->d_parent->d_inode != dir);
Expand Down Expand Up @@ -1066,9 +1063,6 @@ static int ocfs2_rename(struct inode *old_dir,
struct ocfs2_dir_lookup_result orphan_insert = { NULL, };
struct ocfs2_dir_lookup_result target_insert = { NULL, };

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

/* At some point it might be nice to break this function up a
* bit. */

Expand Down

0 comments on commit 7ca5736

Please sign in to comment.