kernels/linux-2.6.24/mm/filemap.c
/*
 * Remove a page from the page cache and free it. Caller has to make
 * sure the page is locked and that nobody else uses it - or that usage
 * is safe.  The caller must hold a write_lock on the mapping's tree_lock.
 */
Remove a page from the page cache and free it. Caller has to make
sure the page is locked and that nobody else uses it - or that usage
is safe.  The caller must hold a write_lock on the mapping's tree_lock.
Remove a page from the page cache and free it . Caller has to make sure the page is locked and that nobody else uses it - or that usage is safe . The caller must hold a write_lock on the mapping ' s tree_lock .
void __remove_from_page_cache(struct page *page)
{
	struct address_space *mapping = page->mapping;
	radix_tree_delete(&mapping->page_tree, page->index);
	page->mapping = NULL;
	mapping->nrpages--;
	__dec_zone_page_state(page, NR_FILE_PAGES);
	BUG_ON(page_mapped(page));
	if (PageDirty(page) && mapping_cap_account_dirty(mapping)) {
		dec_zone_page_state(page, NR_FILE_DIRTY);
		dec_bdi_stat(mapping->backing_dev_info, BDI_RECLAIMABLE);
	}
}
void __remove_from_page_cache ( struct page * page ) { struct address_space * mapping = page -> mapping ; radix_tree_delete ( & mapping -> page_tree , page -> index ) ; page -> mapping = NULL ; mapping -> nrpages -- ; __dec_zone_page_state ( page , NR_FILE_PAGES ) ; BUG_ON ( page_mapped ( page ) ) ; if ( PageDirty ( page ) && mapping_cap_account_dirty ( mapping ) ) { dec_zone_page_state ( page , NR_FILE_DIRTY ) ; dec_bdi_stat ( mapping -> backing_dev_info , BDI_RECLAIMABLE ) ; } }
Remove a page from the page cache and free it.
Remove a page from the page cache and free it .
/*
	 * Some filesystems seem to re-dirty the page even after
	 * the VM has canceled the dirty bit (eg ext3 journaling).
	 *
	 * Fix it up by doing a final dirty accounting check after
	 * having removed the page entirely.
	 */