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>
This commit is contained in:
committed by
Linus Torvalds
parent
4b50dc26a0
commit
e13861d822
@@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user