diff options
-rw-r--r-- | include/linux/pagevec.h | 1 | ||||
-rw-r--r-- | mm/swap.c | 23 |
2 files changed, 0 insertions, 24 deletions
diff --git a/include/linux/pagevec.h b/include/linux/pagevec.h index 7b2886fa7fdc..bab82f4c571c 100644 --- a/include/linux/pagevec.h +++ b/include/linux/pagevec.h | |||
@@ -24,7 +24,6 @@ void __pagevec_release(struct pagevec *pvec); | |||
24 | void __pagevec_free(struct pagevec *pvec); | 24 | void __pagevec_free(struct pagevec *pvec); |
25 | void ____pagevec_lru_add(struct pagevec *pvec, enum lru_list lru); | 25 | void ____pagevec_lru_add(struct pagevec *pvec, enum lru_list lru); |
26 | void pagevec_strip(struct pagevec *pvec); | 26 | void pagevec_strip(struct pagevec *pvec); |
27 | void pagevec_swap_free(struct pagevec *pvec); | ||
28 | unsigned pagevec_lookup(struct pagevec *pvec, struct address_space *mapping, | 27 | unsigned pagevec_lookup(struct pagevec *pvec, struct address_space *mapping, |
29 | pgoff_t start, unsigned nr_pages); | 28 | pgoff_t start, unsigned nr_pages); |
30 | unsigned pagevec_lookup_tag(struct pagevec *pvec, | 29 | unsigned pagevec_lookup_tag(struct pagevec *pvec, |
@@ -457,29 +457,6 @@ void pagevec_strip(struct pagevec *pvec) | |||
457 | } | 457 | } |
458 | 458 | ||
459 | /** | 459 | /** |
460 | * pagevec_swap_free - try to free swap space from the pages in a pagevec | ||
461 | * @pvec: pagevec with swapcache pages to free the swap space of | ||
462 | * | ||
463 | * The caller needs to hold an extra reference to each page and | ||
464 | * not hold the page lock on the pages. This function uses a | ||
465 | * trylock on the page lock so it may not always free the swap | ||
466 | * space associated with a page. | ||
467 | */ | ||
468 | void pagevec_swap_free(struct pagevec *pvec) | ||
469 | { | ||
470 | int i; | ||
471 | |||
472 | for (i = 0; i < pagevec_count(pvec); i++) { | ||
473 | struct page *page = pvec->pages[i]; | ||
474 | |||
475 | if (PageSwapCache(page) && trylock_page(page)) { | ||
476 | try_to_free_swap(page); | ||
477 | unlock_page(page); | ||
478 | } | ||
479 | } | ||
480 | } | ||
481 | |||
482 | /** | ||
483 | * pagevec_lookup - gang pagecache lookup | 460 | * pagevec_lookup - gang pagecache lookup |
484 | * @pvec: Where the resulting pages are placed | 461 | * @pvec: Where the resulting pages are placed |
485 | * @mapping: The address_space to search | 462 | * @mapping: The address_space to search |