samples/c/1/swap.c
void pagevec_swap_free(struct pagevec *pvec)
{
	int i;

	for (i = 0; i < pagevec_count(pvec); i++) {
		struct page *page = pvec->pages[i];

		if (PageSwapCache(page) && trylock_page(page)) {
			if (PageSwapCache(page))
				remove_exclusive_swap_page_ref(page);
			unlock_page(page);
		}
	}
}
/**
 * pagevec_swap_free - try to free swap space from the pages in a pagevec
 * @pvec: pagevec with swapcache pages to free the swap space of
 *
 * The caller needs to hold an extra reference to each page and
 * not hold the page lock on the pages.  This function uses a
 * trylock on the page lock so it may not always free the swap
 * space associated with a page.
 */
try to free swap space from the pages in a pagevec
@pvec: pagevec with swapcache pages to free the swap space of

The caller needs to hold an extra reference to each page and
not hold the page lock on the pages.  This function uses a
trylock on the page lock so it may not always free the swap
space associated with a page.
try to free swap space from the pages in a pagevec @pvec : pagevec with swapcache pages to free the swap space of The caller needs to hold an extra reference to each page and not hold the page lock on the pages . This function uses a trylock on the page lock so it may not always free the swap space associated with a page .
void pagevec_swap_free(struct pagevec *pvec)
{
	int i;
	for (i = 0; i < pagevec_count(pvec); i++) {
		struct page *page = pvec->pages[i];
		if (PageSwapCache(page) && trylock_page(page)) {
			if (PageSwapCache(page))
				remove_exclusive_swap_page_ref(page);
			unlock_page(page);
		}
	}
}
void pagevec_swap_free ( struct pagevec * pvec ) { int i ; for ( i = 0 ; i < pagevec_count ( pvec ) ; i ++ ) { struct page * page = pvec -> pages [ i ] ; if ( PageSwapCache ( page ) && trylock_page ( page ) ) { if ( PageSwapCache ( page ) ) remove_exclusive_swap_page_ref ( page ) ; unlock_page ( page ) ; } } }
pagevec_swap_free - try to free swap space from the pages in a pagevec
 @pvec: pagevec with swapcache pages to free the swap space of
pagevec_swap_free - try to free swap space from the pages in a pagevec @pvec : pagevec with swapcache pages to free the swap space of