Re: [PATCH] Fix shrink_dcache_parent() against shrink_dcache_memory() race (updated patch)

From: Balbir Singh
Date: Thu Mar 09 2006 - 06:34:16 EST


<snip>
> No. Think about a dentry which parent isn't unhashed. This parent will end up
> on the lru-list after the wait_on_prunes(). Therefore we have to do the
> select_parent()/prune_dcache() again to get rid of all dentries.
>

Just checked, yes prune_one_dentry() needs to be called once the parent
gets on to the LRU list, so we must call prune_dcache() again.
In -mm, the generic_shutdown_super() calls shrink_dcache_sb() which takes care
of looping till the lru-list is empty.

Your fix is correct, but the looping is probably not be required for -mm.

Regards,
Balbir

<snip>
-
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/