Quantcast
Channel: lkml.org : Pallipadi, Venkatesh
Viewing all articles
Browse latest Browse all 864

Re: [PATCH 4/4] fs/dcache: Avoid the try_lock loops in dentry_kill()

$
0
0
Linus Torvalds writes: (Summary) wrote:

[...]

Trylock loops are problematic in two scenarios:
I don't mind this patch series per se (although I would really like Al to ack it), but this particular patch I hate.
to ack it), but this particular patch I hate.
Why?
Why?

[...]

as it might have changed after dropping the lock.
I think the trylock should be done first, and then you don't need that recheck for the common case.
recheck for the common case.
I realize that the recheck itself isn't expensive, but it's mostly about the code flow and the comment:
about the code flow and the comment:

[...]

+ * d_lock was dropped.
the thing is, 99.9% of the time the d_lock wasn't dropped, so that "while d_lock was dropped" comment is misleading.

Viewing all articles
Browse latest Browse all 864

Trending Articles