[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFxizbVmQE2Y94BRj3kDFdf6hzNHuy-O0qBFw3jnT_mMLw@mail.gmail.com>
Date: Fri, 13 Sep 2013 16:25:48 -0400
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Al Viro <viro@...iv.linux.org.uk>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Stephen Rothwell <sfr@...b.auug.org.au>,
linux-next <linux-next@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Dave Chinner <dchinner@...hat.com>,
Glauber Costa <glommer@...nvz.org>
Subject: Re: linux-next: manual merge of the akpm tree with Linus' tree
On Fri, Sep 13, 2013 at 4:00 PM, Al Viro <viro@...iv.linux.org.uk> wrote:
\>
> It is right - for one thing, we are holding the lock on that LRU list,
> so list_lru_del() would deadlock right there. For another, the same
> list_lru_walk (OK, list_lru_walk_node()) will do ->nr_items decrement
> when we return LRU_REMOVED to it, so we don't want to do it twice.
> Plain list_del_init() is correct here.
Yes. And I found the opposite bug in one place: when we are collecting
dentries by walking the parents etc, we do *not* hold the global RCU
lock, so we cannot use the "d_lru_shrink_list()" thing after all. It's
correct as far as the internal logic of fs/dcache.c goes, but it
violates the global LRU list rules. So I replaced that with a
dentry_lru_del() followed by a d_shrink_add() instead.
Updated patch attached.
Linus
Download attachment "patch.diff" of type "application/octet-stream" (6636 bytes)
Powered by blists - more mailing lists