Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7ca57363 authored by Sage Weil's avatar Sage Weil Committed by Al Viro
Browse files

ocfs2: remove unnecessary dentry_unhash on rmdir/rename_dir



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: default avatarJoel Becker <jlbec@evilplan.org>
Signed-off-by: default avatarSage Weil <sage@newdream.net>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 8cbfa53b
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -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);
@@ -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. */