Re: [PATCH] mb_cache_shrink() frees unexpected caches

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

 



> > --- 2.6-rc/fs/mbcache.c.orig	2005-07-14 20:40:34.000000000 +0900
> > +++ 2.6-rc/fs/mbcache.c	2005-07-14 20:43:42.000000000 +0900
> > @@ -329,7 +329,7 @@ mb_cache_shrink(struct mb_cache *cache,
> >  	list_for_each_safe(l, ltmp, &mb_cache_lru_list) {
> >  		struct mb_cache_entry *ce =
> >  			list_entry(l, struct mb_cache_entry, e_lru_list);
> > -		if (ce->e_bdev == bdev) {
> > +		if (ce->e_cache == cache && ce->e_bdev == bdev) {
> >  			list_move_tail(&ce->e_lru_list, &free_list);
> >  			__mb_cache_entry_unhash(ce);
> >  		}
> 
> this patch looks bogus to me. How could the cache contain entries for the same 
> block_device from different file systems? The block_device is sufficient to 
> identify the file system, and hence its cache entries.

Why is mb_cache_shrink() declared as:

void
mb_cache_shrink(struct mb_cache *cache, struct block_device *bdev);

The variable cache was never used.


-
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]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux