diff options
author | Minchan Kim <minchan.kim@gmail.com> | 2010-05-24 23:31:59 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-25 17:06:57 +0200 |
commit | e13861d822f8f443ca0c020ea8fc2dc01039cd63 (patch) | |
tree | 0e1ccaa6a2d682f7636b9d5ef5d4c73a28074988 | |
parent | shmem: remove redundant code (diff) | |
download | linux-e13861d822f8f443ca0c020ea8fc2dc01039cd63.tar.xz linux-e13861d822f8f443ca0c020ea8fc2dc01039cd63.zip |
mm: remove return value of putback_lru_pages()
putback_lru_page() never can fail. So it doesn't matter count of "the
number of pages put back".
In addition, users of this functions don't use return value.
Let's remove unnecessary code.
Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
Reviewed-by: Rik van Riel <riel@redhat.com>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | include/linux/migrate.h | 4 | ||||
-rw-r--r-- | mm/migrate.c | 7 |
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 **); #ifdef CONFIG_MIGRATION #define PAGE_MIGRATION 1 -extern int putback_lru_pages(struct list_head *l); +extern void putback_lru_pages(struct list_head *l); extern int migrate_page(struct address_space *, struct page *, struct page *); extern int migrate_pages(struct list_head *l, new_page_t x, @@ -25,7 +25,7 @@ extern int migrate_vmas(struct mm_struct *mm, #else #define PAGE_MIGRATION 0 -static inline int putback_lru_pages(struct list_head *l) { return 0; } +static inline void putback_lru_pages(struct list_head *l) {} static inline int migrate_pages(struct list_head *l, new_page_t x, unsigned long private, int offlining) { return -ENOSYS; } 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) /* * Add isolated pages on the list back to the LRU under page lock * to avoid leaking evictable pages back onto unevictable list. - * - * returns the number of pages put back. */ -int putback_lru_pages(struct list_head *l) +void putback_lru_pages(struct list_head *l) { struct page *page; struct page *page2; - int count = 0; list_for_each_entry_safe(page, page2, l, lru) { list_del(&page->lru); dec_zone_page_state(page, NR_ISOLATED_ANON + page_is_file_cache(page)); putback_lru_page(page); - count++; } - return count; } /* |