From: Sage Weil Date: Tue, 24 May 2011 20:06:21 +0000 (-0700) Subject: ocfs2: remove unnecessary dentry_unhash on rmdir/rename_dir X-Git-Tag: firefly_0821_release~7613^2~1131^2~1 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=7ca57363880c2b321ff64d34a82ae4af86ee52d5;p=firefly-linux-kernel-4.4.55.git ocfs2: remove unnecessary dentry_unhash on rmdir/rename_dir Ocfs2 has no issues with lingering references to unlinked directory inodes. CC: Mark Fasheh CC: ocfs2-devel@oss.oracle.com Acked-by: Joel Becker Signed-off-by: Sage Weil Signed-off-by: Al Viro --- diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c index f3582a6a6dac..e5d738cd9cc0 100644 --- a/fs/ocfs2/namei.c +++ b/fs/ocfs2/namei.c @@ -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. */