Skip to content

Commit

Permalink
Ocfs2: Stop tracking a negative dentry after dentry_iput().
Browse files Browse the repository at this point in the history
I suddenly hit the problem during 2.6.37-rc1 regression test, which was
introduced by commit '5e98d492406818e6a94c0ba54c61f59d40cefa4a'(Track
negative entries v3), following scenario reproduces the issue easily:

Node A			Node B
================	============
$touch 	testfile
			$ls testfile
$rm -rf testfile
$touch 	testfile
			$ls testfile
			ls: cannot access testfile: No such file or directory

This patch stops tracking the dentry which was negativated by a inode deletion,
so as to force the revaliation in next lookup, in case we'll touch the inode
again in the same node.

It didn't hurt the performance of multiple lookup for none-existed files anyway,
while regresses a bit in the first try after a file deletion.

Signed-off-by: Tristan Ye <tristan.ye@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
  • Loading branch information
Tristan Ye authored and Joel Becker committed Nov 18, 2010

Unverified

No user is associated with the committer email.
1 parent 1cf257f commit 1989a80
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion fs/ocfs2/dcache.c
Original file line number Diff line number Diff line change
@@ -476,7 +476,6 @@ static void ocfs2_dentry_iput(struct dentry *dentry, struct inode *inode)

out:
iput(inode);
ocfs2_dentry_attach_gen(dentry);
}

/*

0 comments on commit 1989a80

Please sign in to comment.