Messages in this thread | | | Date | Sun, 18 Jun 2006 19:04:22 -0700 | From | Andrew Morton <> | Subject | Re: [patch 0/5] [PATCH,RFC] vfs: per-superblock unused dentries list (2nd version) |
| |
On Mon, 19 Jun 2006 11:21:04 +1000 Neil Brown <neilb@suse.de> 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |