[Ocfs2-devel] [PATCH 16/18] ocfs2: remove unnecessary dentry_unhash on rmdir/rename_dir
Joel Becker
jlbec at evilplan.org
Tue May 10 13:24:21 PDT 2011
On Mon, May 09, 2011 at 09:43:34PM -0700, Sage Weil wrote:
> Ocfs2 has no issues with lingering references to unlinked directory inodes.
>
> CC: Mark Fasheh <mfasheh at suse.com>
> CC: Joel Becker <jlbec at evilplan.org>
> CC: ocfs2-devel at oss.oracle.com
> Signed-off-by: Sage Weil <sage at newdream.net>
> ---
> fs/ocfs2/namei.c | 6 ------
> 1 files changed, 0 insertions(+), 6 deletions(-)
>
> diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c
> index f3582a6..e5d738c 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);
> -
I'm wary about this. If ocfs2_unlink/ocfs2_rename fail,
d_delete is not called. Also, d_delete doesn't always clear it. I
worry that we'll have a dentry that can be traversed even though its
state in the cluster is bad or unknown.
However, I think our d_revalidate checks should correctly catch
these cases. If we get to the point of doing actual work, we've
assuredly told other nodes to forget about this directory. So I'll
tentatively Ack this, and hope it doesn't explode ;-)
Acked-by: Joel Becker <jlbec at evilplan.org>
--
"I inject pure kryptonite into my brain.
It improves my kung fu, and it eases the pain."
http://www.jlbec.org/
jlbec at evilplan.org
More information about the Ocfs2-devel
mailing list