aboutsummaryrefslogtreecommitdiffstats
path: root/mm/vmscan.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r--mm/vmscan.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 62ac0c488624..24ab1f7394ab 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -46,6 +46,7 @@
46#include <linux/delayacct.h> 46#include <linux/delayacct.h>
47#include <linux/sysctl.h> 47#include <linux/sysctl.h>
48#include <linux/oom.h> 48#include <linux/oom.h>
49#include <linux/pagevec.h>
49#include <linux/prefetch.h> 50#include <linux/prefetch.h>
50#include <linux/printk.h> 51#include <linux/printk.h>
51#include <linux/dax.h> 52#include <linux/dax.h>
@@ -4182,17 +4183,16 @@ int page_evictable(struct page *page)
4182 return ret; 4183 return ret;
4183} 4184}
4184 4185
4185#ifdef CONFIG_SHMEM
4186/** 4186/**
4187 * check_move_unevictable_pages - check pages for evictability and move to appropriate zone lru list 4187 * check_move_unevictable_pages - check pages for evictability and move to
4188 * @pages: array of pages to check 4188 * appropriate zone lru list
4189 * @nr_pages: number of pages to check 4189 * @pvec: pagevec with lru pages to check
4190 * 4190 *
4191 * Checks pages for evictability and moves them to the appropriate lru list. 4191 * Checks pages for evictability, if an evictable page is in the unevictable
4192 * 4192 * lru list, moves it to the appropriate evictable lru list. This function
4193 * This function is only used for SysV IPC SHM_UNLOCK. 4193 * should be only used for lru pages.
4194 */ 4194 */
4195void check_move_unevictable_pages(struct page **pages, int nr_pages) 4195void check_move_unevictable_pages(struct pagevec *pvec)
4196{ 4196{
4197 struct lruvec *lruvec; 4197 struct lruvec *lruvec;
4198 struct pglist_data *pgdat = NULL; 4198 struct pglist_data *pgdat = NULL;
@@ -4200,8 +4200,8 @@ void check_move_unevictable_pages(struct page **pages, int nr_pages)
4200 int pgrescued = 0; 4200 int pgrescued = 0;
4201 int i; 4201 int i;
4202 4202
4203 for (i = 0; i < nr_pages; i++) { 4203 for (i = 0; i < pvec->nr; i++) {
4204 struct page *page = pages[i]; 4204 struct page *page = pvec->pages[i];
4205 struct pglist_data *pagepgdat = page_pgdat(page); 4205 struct pglist_data *pagepgdat = page_pgdat(page);
4206 4206
4207 pgscanned++; 4207 pgscanned++;
@@ -4233,4 +4233,4 @@ void check_move_unevictable_pages(struct page **pages, int nr_pages)
4233 spin_unlock_irq(&pgdat->lru_lock); 4233 spin_unlock_irq(&pgdat->lru_lock);
4234 } 4234 }
4235} 4235}
4236#endif /* CONFIG_SHMEM */ 4236EXPORT_SYMBOL_GPL(check_move_unevictable_pages);