diff options
Diffstat (limited to 'mm/swap.c')
-rw-r--r-- | mm/swap.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/mm/swap.c b/mm/swap.c index 7771d2803f6..73d351439ef 100644 --- a/mm/swap.c +++ b/mm/swap.c @@ -34,12 +34,10 @@ /* How many pages do we try to swap or page in/out together? */ int page_cluster; -#ifdef CONFIG_HUGETLB_PAGE - void put_page(struct page *page) { if (unlikely(PageCompound(page))) { - page = (struct page *)page->private; + page = (struct page *)page_private(page); if (put_page_testzero(page)) { void (*dtor)(struct page *page); @@ -48,11 +46,10 @@ void put_page(struct page *page) } return; } - if (!PageReserved(page) && put_page_testzero(page)) + if (put_page_testzero(page)) __page_cache_release(page); } EXPORT_SYMBOL(put_page); -#endif /* * Writeback is about to end against a page which has been marked for immediate @@ -215,7 +212,7 @@ void release_pages(struct page **pages, int nr, int cold) struct page *page = pages[i]; struct zone *pagezone; - if (PageReserved(page) || !put_page_testzero(page)) + if (!put_page_testzero(page)) continue; pagezone = page_zone(page); @@ -259,6 +256,8 @@ void __pagevec_release(struct pagevec *pvec) pagevec_reinit(pvec); } +EXPORT_SYMBOL(__pagevec_release); + /* * pagevec_release() for pages which are known to not be on the LRU * @@ -270,7 +269,6 @@ void __pagevec_release_nonlru(struct pagevec *pvec) struct pagevec pages_to_free; pagevec_init(&pages_to_free, pvec->cold); - pages_to_free.cold = pvec->cold; for (i = 0; i < pagevec_count(pvec); i++) { struct page *page = pvec->pages[i]; @@ -388,6 +386,7 @@ unsigned pagevec_lookup_tag(struct pagevec *pvec, struct address_space *mapping, return pagevec_count(pvec); } +EXPORT_SYMBOL(pagevec_lookup_tag); #ifdef CONFIG_SMP /* @@ -411,7 +410,6 @@ void vm_acct_memory(long pages) } preempt_enable(); } -EXPORT_SYMBOL(vm_acct_memory); #ifdef CONFIG_HOTPLUG_CPU static void lru_drain_cache(unsigned int cpu) |