Re: [RFC PATCH] shrink_dcache_parent() deadlock

From: Al Viro
Date: Mon Jan 09 2012 - 12:27:10 EST


On Mon, Jan 09, 2012 at 11:58:54AM +0100, Miklos Szeredi wrote:

> This patch adds a new dentry flag that is set when the dentry is removed
> from the lru and put on the list being processed by
> shrink_dentry_list(). The flag is cleared in dentry_lru_del() which is
> called if the dentry gets a new reference just before it's pruned.

Umm... In principle, I like that variant, provided that you send it with
sane commit message. Explicit description of the conditions when new
flag is set will probably turn out to be very useful several months down
the road, so... Unless I'm misreading you, it should be something along
the lines of "flag is set if and only if dentry->d_lru is currently a part of
tmp cyclic list of some ongoing __shrink_dcache_sb() instance", preferably
without torturing the langauge so much...
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/