Re: put_page() tries to handle hugepages but fails

From: David Gibson
Date: Tue Apr 27 2004 - 00:23:29 EST


On Mon, Apr 26, 2004 at 10:15:19PM -0700, Andrew Morton wrote:
> David Gibson <david@xxxxxxxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/