All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Gruenbacher <agruen@suse.de>
To: Akinobu Mita <amgta@yacht.ocn.ne.jp>
Cc: linux-kernel@vger.kernel.org, Andrew Morton <akpm@zip.com.au>
Subject: Re: [PATCH] mb_cache_shrink() frees unexpected caches
Date: Fri, 15 Jul 2005 12:49:52 +0200	[thread overview]
Message-ID: <200507151249.52294.agruen@suse.de> (raw)
In-Reply-To: <1121346444.4282.8.camel@localhost.localdomain>

Hello,

On Thursday 14 July 2005 15:07, Akinobu Mita wrote:
> mb_cache_shrink() tries to free all sort of mbcache in the lru list.
>
> All user of mb_cache_shrink() are ext2/ext3 xattr.
>
> Signed-off-by: Akinobu Mita <amgta@yacht.ocn.ne.jp>
>
> --- 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.

Also, the additional check would only tell ext2 from ext3; the caches are not 
per-filesystem.

-- Andreas.

  reply	other threads:[~2005-07-15 10:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-14 13:07 [PATCH] mb_cache_shrink() frees unexpected caches Akinobu Mita
2005-07-15 10:49 ` Andreas Gruenbacher [this message]
2005-07-15 13:41   ` Akinobu Mita
2005-07-15 14:36     ` Andreas Gruenbacher
2005-07-15 15:07       ` Akinobu Mita
2005-07-15 15:30         ` Akinobu Mita
2005-07-16  1:44         ` Andreas Gruenbacher
2005-07-16  3:53           ` Akinobu Mita

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200507151249.52294.agruen@suse.de \
    --to=agruen@suse.de \
    --cc=akpm@zip.com.au \
    --cc=amgta@yacht.ocn.ne.jp \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.