lkml.org 
[lkml]   [2002]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectFree pages after brw_page() in buffer.c
Date
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


-
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 13:25    [W:0.046 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site