Re: [patch 0/5] [PATCH,RFC] vfs: per-superblock unused dentries list (2nd version)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 19 Jun 2006 11:21:04 +1000
Neil Brown <[email protected]> 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux