From: Andrew Morton <akpm@osdl.org>
To: William Lee Irwin III <wli@holomorphy.com>
Cc: david@gibson.dropbear.id.au, linux-kernel@vger.kernel.org,
linuxppc64-dev@lists.linuxppc.org
Subject: Re: put_page() tries to handle hugepages but fails
Date: Fri, 23 Apr 2004 03:35:22 -0700 [thread overview]
Message-ID: <20040423033522.03ab14fc.akpm@osdl.org> (raw)
In-Reply-To: <20040423102824.GF743@holomorphy.com>
William Lee Irwin III <wli@holomorphy.com> wrote:
>
> --- wli-2.6.6-rc2-mm1.orig/mm/swap.c 2004-04-21 05:19:58.000000000 -0700
> +++ wli-2.6.6-rc2-mm1/mm/swap.c 2004-04-23 03:21:22.000000000 -0700
> @@ -41,15 +41,12 @@
> if (unlikely(PageCompound(page))) {
> page = (struct page *)page->private;
> if (put_page_testzero(page)) {
> - if (page[1].mapping) { /* destructor? */
> - (*(void (*)(struct page *))page[1].mapping)(page);
> - } else {
> - __page_cache_release(page);
> - }
> + void (*destructor)(struct page *);
> + destructor = (void (*)(struct page *))page[1].mapping;
> + BUG_ON(!destructor);
> + (*destructor)(page);
> }
> - return;
> - }
> - if (!PageReserved(page) && put_page_testzero(page))
> + } else if (!PageReserved(page) && put_page_testzero(page))
> __page_cache_release(page);
Sure.
This of course duplicates huge_page_release(), which can be killed off.
next prev parent reply other threads:[~2004-04-23 10:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-23 8:18 put_page() tries to handle hugepages but fails David Gibson
2004-04-23 8:34 ` Andrew Morton
2004-04-23 10:28 ` William Lee Irwin III
2004-04-23 10:35 ` Andrew Morton [this message]
2004-04-23 10:47 ` William Lee Irwin III
2004-04-23 11:28 ` William Lee Irwin III
2004-04-27 4:36 ` David Gibson
2004-04-27 4:41 ` David Gibson
2004-04-27 4:47 ` Andrew Morton
2004-04-27 5:05 ` David Gibson
2004-04-27 5:15 ` Andrew Morton
2004-04-27 5:16 ` David Gibson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040423033522.03ab14fc.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=david@gibson.dropbear.id.au \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc64-dev@lists.linuxppc.org \
--cc=wli@holomorphy.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox