2.4.19 ( try_to_swap_out) does not set page->mapping to NULL

Bourne (bourne@ToughGuy.net)
Fri, 13 Dec 2002 08:59:26 +0530


Hi all, A small piece of code in mm/vmscan.c kept me confused. Please
could some one explain this ?

File: mm/vmscan.c , try_to_swap_out()

....SNIP....
drop_pte: mm->rss--
UnlockPage(page);
---SNIP--
page_cache_release(page);
return freeable;
----SNIP----
if(page->mapping)
goto drop_pte;

What i can get is if page->mapping is NOT NULL , then do a
page_cache_release(). This boils down to __free_pages_ok(). Here the
code snippet is if(page->mapping) BUG();

So if try_to_swap_out wants to drop a page which can be brought in
always ( i.e , not dirty ), then what is the harm in setting it to NULL ?

TIA

Bourne

-
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/