lkml.org 
[lkml]   [2004]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: put_page() tries to handle hugepages but fails
On Mon, Apr 26, 2004 at 10:15:19PM -0700, Andrew Morton wrote:
> David Gibson <david@gibson.dropbear.id.au> wrote:
> >
> > 1) put_page() can still theoretically call
> > __page_cache_release() which is wrong (and makes the code misleading)
>
> Don't think so?
>
> void put_page(struct page *page)
> {
> if (unlikely(PageCompound(page))) {
> page = (struct page *)page->private;
> if (put_page_testzero(page)) {
> void (*dtor)(struct page *page);
>
> dtor = (void (*)(struct page *))page[1].mapping;
> (*dtor)(page);
> }
> return;
> }
> if (!PageReserved(page) && put_page_testzero(page))
> __page_cache_release(page);
> }

Dang. Missed that patch in the series. My mistake.

--
David Gibson | For every complex problem there is a
david AT gibson.dropbear.id.au | solution which is simple, neat and
| wrong.
http://www.ozlabs.org/people/dgibson
-
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/

\
 
 \ /
  Last update: 2005-03-22 14:02    [W:0.036 / U:0.892 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site