Re: [patch 0/5] [PATCH,RFC] vfs: per-superblock unused dentrieslist (2nd version)
From: Andrew Morton
Date: Sun Jun 18 2006 - 22:03:15 EST
On Mon, 19 Jun 2006 11:21:04 +1000
Neil Brown <neilb@xxxxxxx> wrote:
> static void prune_dcache(int count, struct super_block *sb)
> +static void prune_dcache(int count, struct list_head *list)
> {
> + int have_list = list != NULL;
> + struct list_head alt_head;
> spin_lock(&dcache_lock);
> + if (list == NULL) {
> + /* use the dentry_unused list */
> + list_add(&alt_head, &dentry_unused);
> + list_del_init(&dentry_unused);
> + list = &alt_head;
> + }
This will make dentry_unused appear to be empty.
> for (; count ; count--) {
> struct dentry *dentry;
> struct list_head *tmp;
> @@ -405,23 +417,11 @@ static void prune_dcache(int count, stru
>
> cond_resched_lock(&dcache_lock);
And then it makes that apparent-emptiness globally visible.
Won't this cause concurrent unmounting or memory shrinking to malfunction?
-
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/