X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=mm%2Fswap.c;h=bede23ce64ea28e52d991168f2c93cd2243c893a;hb=c7edad5fcb86c4398f9ab2ccea82ddcc067b88af;hp=8adb9feb61e10b7385e01d3410d8cb0f0a4807e1;hpb=97d61b8e3aef163a75f80f4762794c154572293d;p=~andy%2Flinux diff --git a/mm/swap.c b/mm/swap.c index 8adb9feb61e..bede23ce64e 100644 --- a/mm/swap.c +++ b/mm/swap.c @@ -448,37 +448,14 @@ void pagevec_strip(struct pagevec *pvec) for (i = 0; i < pagevec_count(pvec); i++) { struct page *page = pvec->pages[i]; - if (PagePrivate(page) && trylock_page(page)) { - if (PagePrivate(page)) + if (page_has_private(page) && trylock_page(page)) { + if (page_has_private(page)) try_to_release_page(page, 0); 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. - */ -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)) { - try_to_free_swap(page); - unlock_page(page); - } - } -} - /** * pagevec_lookup - gang pagecache lookup * @pvec: Where the resulting pages are placed