Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751813AbaBIRfS (ORCPT ); Sun, 9 Feb 2014 12:35:18 -0500 Received: from zene.cmpxchg.org ([85.214.230.12]:59421 "EHLO zene.cmpxchg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751516AbaBIRfO (ORCPT ); Sun, 9 Feb 2014 12:35:14 -0500 Date: Sun, 9 Feb 2014 12:34:18 -0500 From: Johannes Weiner To: Rafael Aquini Cc: Andrew Morton , Andi Kleen , Andrea Arcangeli , Bob Liu , Christoph Hellwig , Dave Chinner , Greg Thelen , Hugh Dickins , Jan Kara , KOSAKI Motohiro , Luigi Semenzato , Mel Gorman , Metin Doslu , Michel Lespinasse , Minchan Kim , Ozgun Erdogan , Peter Zijlstra , Rik van Riel , Roman Gushchin , Ryan Mallon , Tejun Heo , Vlastimil Babka , linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [patch 02/10] fs: cachefiles: use add_to_page_cache_lru() Message-ID: <20140209173418.GH4407@cmpxchg.org> References: <1391475222-1169-1-git-send-email-hannes@cmpxchg.org> <1391475222-1169-3-git-send-email-hannes@cmpxchg.org> <20140208114334.GA25841@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140208114334.GA25841@localhost.localdomain> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Feb 08, 2014 at 09:43:35AM -0200, Rafael Aquini wrote: > On Mon, Feb 03, 2014 at 07:53:34PM -0500, Johannes Weiner wrote: > > This code used to have its own lru cache pagevec up until a0b8cab3 > > ("mm: remove lru parameter from __pagevec_lru_add and remove parts of > > pagevec API"). Now it's just add_to_page_cache() followed by > > lru_cache_add(), might as well use add_to_page_cache_lru() directly. > > > > Just a heads-up, here: take a look at https://lkml.org/lkml/2014/2/7/587 Ah, yes. That patch replaced a private pagevec, which consumes the references you pass in, with add_to_page_cache_lru(), which gets its own references. My patch changes add_to_page_cache() lru_cache_add() to add_to_page_cache_lru() add_to_page_cache() lru_cache_add() so the refcounting does not change for the caller. Thanks for pointing it out, though, it never hurts to double check stuff like that. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/