kernels/linux-2.4.0/mm/page_io.c
/*
 * The swap lock map insists that pages be in the page cache!
 * Therefore we can't use it.  Later when we can remove the need for the
 * lock map and we can reduce the number of functions exported.
 */
The swap lock map insists that pages be in the page cache.
Therefore we can't use it.  Later when we can remove the need for the
lock map and we can reduce the number of functions exported.
The swap lock map insists that pages be in the page cache . Therefore we can ' t use it . Later when we can remove the need for the lock map and we can reduce the number of functions exported .
void rw_swap_page_nolock(int rw, swp_entry_t entry, char *buf, int wait)
{
	struct page *page = virt_to_page(buf);
	if (!PageLocked(page))
		PAGE_BUG(page);
	if (PageSwapCache(page))
		PAGE_BUG(page);
	if (page->mapping)
		PAGE_BUG(page);
	page->mapping = &swapper_space;
	if (!rw_swap_page_base(rw, entry, page, wait))
		UnlockPage(page);
	page->mapping = NULL;
}
void rw_swap_page_nolock ( int rw , swp_entry_t entry , char * buf , int wait ) { struct page * page = virt_to_page ( buf ) ; if ( ! PageLocked ( page ) ) PAGE_BUG ( page ) ; if ( PageSwapCache ( page ) ) PAGE_BUG ( page ) ; if ( page -> mapping ) PAGE_BUG ( page ) ; page -> mapping = & swapper_space ; if ( ! rw_swap_page_base ( rw , entry , page , wait ) ) UnlockPage ( page ) ; page -> mapping = NULL ; }
The swap lock map insists that pages be in the page cache!
The swap lock map insists that pages be in the page cache!
/* needs sync_page to wait I/O completation */