Commit 84be48d8 authored by Kirill A. Shutemov's avatar Kirill A. Shutemov Committed by Linus Torvalds

mm/page_alloc.c: use list_move() instead of list_del()/list_add() combination

Signed-off-by: default avatarKirill A. Shutemov <kirill@shutemov.name>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Rik van Riel <riel@redhat.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Reviewed-by: default avatarChristoph Lameter <cl@linux.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent a42931bf
...@@ -867,9 +867,8 @@ static int move_freepages(struct zone *zone, ...@@ -867,9 +867,8 @@ static int move_freepages(struct zone *zone,
} }
order = page_order(page); order = page_order(page);
list_del(&page->lru); list_move(&page->lru,
list_add(&page->lru, &zone->free_area[order].free_list[migratetype]);
&zone->free_area[order].free_list[migratetype]);
page += 1 << order; page += 1 << order;
pages_moved += 1 << order; pages_moved += 1 << order;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment