From: "Wong Tsang" <kernel@kingdom-lan.net>
To: <linux-kernel@vger.kernel.org>
Subject: Free pages after brw_page() in buffer.c
Date: Mon, 29 Apr 2002 16:06:54 +0800 [thread overview]
Message-ID: <006d01c1ef54$d35f8b30$0100a8c0@client> (raw)
Dear all,
I dun know whether it is appropriate to ask question here. But
I have seeked for help in many places and got no replies. :(
Pls forgive me if I have done something wrong.
I have written a driver to do some I/O using brw_page(). I first
use __get_free_pages() to get some free pages and then pass them to brw_page()
to issue the I/O requests. Afterwards, I find that I have difficulties to free the
allocated pages by simply using free_pages().Because the page->count
becomes 2 (increment once in __get_free_pages() and increment once
in brw_page() ) and page->buffers is not NULL.
So what is the appropriate way to decrement the page count made
by brw_page and free those buffers in page->buffers? or more specifically,
how can I free the pages which have been used in brw_page()?
After reading buffer.c, I guess try_to_free_buffers() may work but
I fear it is not the appropriate and may leave some hidden problems afterwards.
Thx in advance!
Wong Tsang
reply other threads:[~2002-04-29 8:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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='006d01c1ef54$d35f8b30$0100a8c0@client' \
--to=kernel@kingdom-lan.net \
--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.