Re: [patch 2/13] remove pages from the LRU in __free_pages_ok()

Linus Torvalds
2002-07-28T23:49:29Z

On Sun, 28 Jul 2002, Andrew Morton wrote:
>
> There are some situations where a page's final release is performed by
> put_page(). Such as in access_process_vm(). This tends to go BUG()
> because the page is on the LRU.

This is wrong.

If that happens, then you should just make access_process_vm() use
"page_cache_release()". That's what you basically make "__free_pages_ok()"
do, but since you still have to add the BUG_ON() check to make clear that
it is illegal to do this from an interrupt context, it's much better to
just do this check statically.

Linus