提交 84be48d8 编写于 作者: K Kirill A. Shutemov 提交者: Linus Torvalds

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

Signed-off-by: NKirill 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: NChristoph Lameter <cl@linux.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 a42931bf
......@@ -867,9 +867,8 @@ static int move_freepages(struct zone *zone,
}
order = page_order(page);
list_del(&page->lru);
list_add(&page->lru,
&zone->free_area[order].free_list[migratetype]);
list_move(&page->lru,
&zone->free_area[order].free_list[migratetype]);
page += 1 << order;
pages_moved += 1 << order;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册