From: Dave Hansen <haveblue@us.ibm.com>
To: "Martin J. Bligh" <Martin.Bligh@us.ibm.com>
Cc: Andrew Morton <akpm@zip.com.au>, linux-kernel@vger.kernel.org
Subject: Re: truncate_list_pages() BUG and confusion
Date: Thu, 07 Mar 2002 19:04:38 -0800 [thread overview]
Message-ID: <3C882A46.7060409@us.ibm.com> (raw)
In-Reply-To: <3C880EFF.A0789715@zip.com.au> <1044120155.1015527354@[10.10.2.3]>
Martin J. Bligh wrote:
> Where did truncate_list_pages unlock it? It doesn't do that
> until after it's called truncate_complete_page, which (indirectly)
> frees the page ... ?
Ahh, put_page_testzero
#define put_page_testzero(p) atomic_dec_and_test(&(p)->count)
It will only try to free if the page count is zero. The caller makes
sure that this doesn't happen.
if (!PageReserved(page) && put_page_testzero(page)) {
if (PageLRU(page))
lru_cache_del(page);
__free_pages_ok(page, 0);
}
--
Dave Hansen
haveblue@us.ibm.com
next prev parent reply other threads:[~2002-03-08 3:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-08 0:45 truncate_list_pages() BUG and confusion Dave Hansen
2002-03-08 1:08 ` Andrew Morton
2002-03-08 2:54 ` Dave Hansen
2002-03-08 2:55 ` Martin J. Bligh
2002-03-08 3:02 ` Andrew Morton
2002-03-08 3:04 ` Dave Hansen [this message]
2002-03-08 21:14 ` Martin J. Bligh
2002-03-08 21:53 ` Andrew Morton
2002-03-08 22:13 ` Dave Hansen
2002-03-08 22:35 ` Andrew Morton
2002-03-09 0:04 ` Martin J. Bligh
2002-03-09 0:17 ` Andrew Morton
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=3C882A46.7060409@us.ibm.com \
--to=haveblue@us.ibm.com \
--cc=Martin.Bligh@us.ibm.com \
--cc=akpm@zip.com.au \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.