From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752846AbaEBWk0 (ORCPT ); Fri, 2 May 2014 18:40:26 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:32830 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751846AbaEBWkY (ORCPT ); Fri, 2 May 2014 18:40:24 -0400 Date: Fri, 2 May 2014 23:40:22 +0100 From: Al Viro To: Linus Torvalds Cc: Miklos Szeredi , Dave Chinner , Linux Kernel Mailing List , linux-fsdevel Subject: Re: dcache shrink list corruption? Message-ID: <20140502224022.GJ18016@ZenIV.linux.org.uk> References: <20140429214842.GL18016@ZenIV.linux.org.uk> <20140429232013.GM18016@ZenIV.linux.org.uk> <20140430023142.GN18016@ZenIV.linux.org.uk> <20140430091515.GB3113@tucsk.piliscsaba.szeredi.hu> <20140502055127.GH18016@ZenIV.linux.org.uk> <20140502210813.GB32527@tucsk.piliscsaba.szeredi.hu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 02, 2014 at 02:18:43PM -0700, Linus Torvalds wrote: > On Fri, May 2, 2014 at 2:08 PM, Miklos Szeredi wrote: > > There's more of the "delete from shrink list not owned by us" in select parent. > > Proposed patch appended. > > Ahh. Clearly this needs more work before I pull. *nod* Besides, I want to put Miklos' "don't bother with RCU in shrink_dentry_list()" in there as soon as select_collect() has been dealt with. I don't think that the currently posted patch for select_collect() is right, though - see my reply to parent posting. Basically, I think we should treat "it's on the shrink list already" as "increment data->found and keep going". IOW, if (on shrink list) { data->found++; } else { if (on lru list) d_lru_del if (refcount is zero) { d_shrink_add data->found++; } } if (data->found) ret = need_resched() ? D_WALK_QUIT : D_WALK_NORETRY;