X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=mm%2Fswap.c;h=bede23ce64ea28e52d991168f2c93cd2243c893a;hb=05b363020decda179b51350bb9199a0c2ce3ef42;hp=8adb9feb61e10b7385e01d3410d8cb0f0a4807e1;hpb=b17304245f0db0ac69b795c411407808f3f2796d;p=linux-2.6-omap-h63xx.git 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