From: Michal Hocko <mhocko@suse.cz>
To: Glauber Costa <glommer@gmail.com>
Cc: linux-mm <linux-mm@kvack.org>,
Andrew Morton <akpm@linux-foundation.org>,
dchinner@redhat.com, Glauber Costa <glommer@openvz.org>
Subject: Re: [PATCH 1/2] inode: move inode to a different list inside lock
Date: Wed, 26 Jun 2013 10:28:07 +0200 [thread overview]
Message-ID: <20130626082807.GH28748@dhcp22.suse.cz> (raw)
In-Reply-To: <1372228181-18827-2-git-send-email-glommer@openvz.org>
On Wed 26-06-13 02:29:40, Glauber Costa wrote:
> When removing an element from the lru, this will be done today after the lock
> is released. This is a clear mistake, although we are not sure if the bugs we
> are seeing are related to this. All list manipulations are done inside the
> lock, and so should this one.
>
> Signed-off-by: Glauber Costa <glommer@openvz.org>
Yes this fixed BUG_ONs triggered during my testing (e.g. BUG at mm/list_lru.c:92)
Tested-by: Michal Hocko <mhocko@suse.cz>
> ---
> fs/inode.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/inode.c b/fs/inode.c
> index a2b49c8..e315c0a 100644
> --- a/fs/inode.c
> +++ b/fs/inode.c
> @@ -735,9 +735,9 @@ inode_lru_isolate(struct list_head *item, spinlock_t *lru_lock, void *arg)
>
> WARN_ON(inode->i_state & I_NEW);
> inode->i_state |= I_FREEING;
> + list_move(&inode->i_lru, freeable);
> spin_unlock(&inode->i_lock);
>
> - list_move(&inode->i_lru, freeable);
> this_cpu_dec(nr_unused);
> return LRU_REMOVED;
> }
> --
> 1.8.2.1
>
--
Michal Hocko
SUSE Labs
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2013-06-26 8:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-26 6:29 [PATCH 0/2] fixes for list_lru Glauber Costa
2013-06-26 6:29 ` [PATCH 1/2] inode: move inode to a different list inside lock Glauber Costa
2013-06-26 8:28 ` Michal Hocko [this message]
2013-06-26 6:29 ` [PATCH 2/2] super: fix for destroy lrus Glauber Costa
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=20130626082807.GH28748@dhcp22.suse.cz \
--to=mhocko@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=dchinner@redhat.com \
--cc=glommer@gmail.com \
--cc=glommer@openvz.org \
--cc=linux-mm@kvack.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).