Browse files

mm: fix wrong argument of migrate_huge_pages() in soft_offline_huge_p…


commit dc32f63 upstream.

Commit a6bc32b ("mm: compaction: introduce sync-light migration for
use by compaction") changed the declaration of migrate_pages() and

But it missed changing the argument of migrate_huge_pages() in
soft_offline_huge_page().  In this case, we should call
migrate_huge_pages() with MIGRATE_SYNC.

Additionally, there is a mismatch between type the of argument and the
function declaration for migrate_pages().

Signed-off-by: Joonsoo Kim <>
Cc: Christoph Lameter <>
Cc: Mel Gorman <>
Acked-by: David Rientjes <>
Cc: "Aneesh Kumar K.V" <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
Signed-off-by: Ben Hutchings <>
  • Loading branch information...
1 parent 86fccf3 commit 901cf39b0b51c3c31ad0f0e3104742e4d1c831ef @JoonsooKim JoonsooKim committed with bwhacks Jul 30, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 mm/memory-failure.c
@@ -1427,8 +1427,8 @@ static int soft_offline_huge_page(struct page *page, int flags)
/* Keep page count to indicate a given hugepage is isolated. */
list_add(&hpage->lru, &pagelist);
- ret = migrate_huge_pages(&pagelist, new_page, MPOL_MF_MOVE_ALL, 0,
- true);
+ ret = migrate_huge_pages(&pagelist, new_page, MPOL_MF_MOVE_ALL, false,
if (ret) {
struct page *page1, *page2;
list_for_each_entry_safe(page1, page2, &pagelist, lru)
@@ -1557,7 +1557,7 @@ int soft_offline_page(struct page *page, int flags)
list_add(&page->lru, &pagelist);
ret = migrate_pages(&pagelist, new_page, MPOL_MF_MOVE_ALL,
+ false, MIGRATE_SYNC);
if (ret) {
pr_info("soft offline: %#lx: migration failed %d, type %lx\n",

0 comments on commit 901cf39

Please sign in to comment.