Re: Correct way to release get_user_pages()?

2005-01-31 Thread Andrew Morton
Timur Tabi <[EMAIL PROTECTED]> wrote: > > Andrew Morton wrote: > > > no... You should only dirty the page if it was modified, and then use > > set_page_dirty() or set_page_dirty_lock(). > > If the page was modified, then shouldn't it already be marked dirty? If the page is modified by a DMA tra

Re: Correct way to release get_user_pages()?

2005-01-31 Thread Timur Tabi
Andrew Morton wrote: no... You should only dirty the page if it was modified, and then use set_page_dirty() or set_page_dirty_lock(). If the page was modified, then shouldn't it already be marked dirty? Also, should I always use set_page_dirty_lock() if I haven't already locked the page? -- Timu

Re: Correct way to release get_user_pages()?

2005-01-30 Thread Andrew Morton
Timur Tabi <[EMAIL PROTECTED]> wrote: > > Roland Dreier wrote: > > > Reading through the tree, I see that some callers of get_user_pages() > > release the pages that they got via put_page(), and some callers use > > page_cache_release(). Of course has > > > >#define page_cache_release

Re: Correct way to release get_user_pages()?

2005-01-28 Thread Timur Tabi
Roland Dreier wrote: Reading through the tree, I see that some callers of get_user_pages() release the pages that they got via put_page(), and some callers use page_cache_release(). Of course has #define page_cache_release(page) put_page(page) so this is really not much of a differen

Correct way to release get_user_pages()?

2005-01-27 Thread Roland Dreier
Reading through the tree, I see that some callers of get_user_pages() release the pages that they got via put_page(), and some callers use page_cache_release(). Of course has #define page_cache_release(page) put_page(page) so this is really not much of a difference, but I'd like to