aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/migrate.h4
-rw-r--r--mm/migrate.c7
2 files changed, 3 insertions, 8 deletions
diff --git a/include/linux/migrate.h b/include/linux/migrate.h
index 7f085c97c799..7a07b17d27c5 100644
--- a/include/linux/migrate.h
+++ b/include/linux/migrate.h
@@ -9,7 +9,7 @@ typedef struct page *new_page_t(struct page *, unsigned long private, int **);
9#ifdef CONFIG_MIGRATION 9#ifdef CONFIG_MIGRATION
10#define PAGE_MIGRATION 1 10#define PAGE_MIGRATION 1
11 11
12extern int putback_lru_pages(struct list_head *l); 12extern void putback_lru_pages(struct list_head *l);
13extern int migrate_page(struct address_space *, 13extern int migrate_page(struct address_space *,
14 struct page *, struct page *); 14 struct page *, struct page *);
15extern int migrate_pages(struct list_head *l, new_page_t x, 15extern int migrate_pages(struct list_head *l, new_page_t x,
@@ -25,7 +25,7 @@ extern int migrate_vmas(struct mm_struct *mm,
25#else 25#else
26#define PAGE_MIGRATION 0 26#define PAGE_MIGRATION 0
27 27
28static inline int putback_lru_pages(struct list_head *l) { return 0; } 28static inline void putback_lru_pages(struct list_head *l) {}
29static inline int migrate_pages(struct list_head *l, new_page_t x, 29static inline int migrate_pages(struct list_head *l, new_page_t x,
30 unsigned long private, int offlining) { return -ENOSYS; } 30 unsigned long private, int offlining) { return -ENOSYS; }
31 31
diff --git a/mm/migrate.c b/mm/migrate.c
index d3f3f7f81075..5938db54e1d7 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -58,23 +58,18 @@ int migrate_prep(void)
58/* 58/*
59 * Add isolated pages on the list back to the LRU under page lock 59 * Add isolated pages on the list back to the LRU under page lock
60 * to avoid leaking evictable pages back onto unevictable list. 60 * to avoid leaking evictable pages back onto unevictable list.
61 *
62 * returns the number of pages put back.
63 */ 61 */
64int putback_lru_pages(struct list_head *l) 62void putback_lru_pages(struct list_head *l)
65{ 63{
66 struct page *page; 64 struct page *page;
67 struct page *page2; 65 struct page *page2;
68 int count = 0;
69 66
70 list_for_each_entry_safe(page, page2, l, lru) { 67 list_for_each_entry_safe(page, page2, l, lru) {
71 list_del(&page->lru); 68 list_del(&page->lru);
72 dec_zone_page_state(page, NR_ISOLATED_ANON + 69 dec_zone_page_state(page, NR_ISOLATED_ANON +
73 page_is_file_cache(page)); 70 page_is_file_cache(page));
74 putback_lru_page(page); 71 putback_lru_page(page);
75 count++;
76 } 72 }
77 return count;
78} 73}
79 74
80/* 75/*