lkml.org 
[lkml]   [2014]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 02/10] fs: cachefiles: use add_to_page_cache_lru()
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.


\
 
 \ /
  Last update: 2014-02-09 19:21    [W:0.333 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site