diff options
author | Joonsoo Kim <js1304@gmail.com> | 2012-07-30 17:39:04 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-08-15 15:04:10 -0400 |
commit | cad33da5ceedac56481dd3168e42580e9bec6343 (patch) | |
tree | 63d35263887e9cd22324e4962372afc50101cbba /mm/memory-failure.c | |
parent | 83c0c5e47281e4fb3eedf56fa8cf8b895aede0e0 (diff) |
mm: fix wrong argument of migrate_huge_pages() in soft_offline_huge_page()
commit dc32f63453f56d07a1073a697dcd843dd3098c09 upstream.
Commit a6bc32b89922 ("mm: compaction: introduce sync-light migration for
use by compaction") changed the declaration of migrate_pages() and
migrate_huge_pages().
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 <js1304@gmail.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Mel Gorman <mgorman@suse.de>
Acked-by: David Rientjes <rientjes@google.com>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm/memory-failure.c')
-rw-r--r-- | mm/memory-failure.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 6496748df21..2f49dcf4f47 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c | |||
@@ -1334,8 +1334,8 @@ static int soft_offline_huge_page(struct page *page, int flags) | |||
1334 | /* Keep page count to indicate a given hugepage is isolated. */ | 1334 | /* Keep page count to indicate a given hugepage is isolated. */ |
1335 | 1335 | ||
1336 | list_add(&hpage->lru, &pagelist); | 1336 | list_add(&hpage->lru, &pagelist); |
1337 | ret = migrate_huge_pages(&pagelist, new_page, MPOL_MF_MOVE_ALL, 0, | 1337 | ret = migrate_huge_pages(&pagelist, new_page, MPOL_MF_MOVE_ALL, false, |
1338 | true); | 1338 | MIGRATE_SYNC); |
1339 | if (ret) { | 1339 | if (ret) { |
1340 | struct page *page1, *page2; | 1340 | struct page *page1, *page2; |
1341 | list_for_each_entry_safe(page1, page2, &pagelist, lru) | 1341 | list_for_each_entry_safe(page1, page2, &pagelist, lru) |
@@ -1464,7 +1464,7 @@ int soft_offline_page(struct page *page, int flags) | |||
1464 | page_is_file_cache(page)); | 1464 | page_is_file_cache(page)); |
1465 | list_add(&page->lru, &pagelist); | 1465 | list_add(&page->lru, &pagelist); |
1466 | ret = migrate_pages(&pagelist, new_page, MPOL_MF_MOVE_ALL, | 1466 | ret = migrate_pages(&pagelist, new_page, MPOL_MF_MOVE_ALL, |
1467 | 0, MIGRATE_SYNC); | 1467 | false, MIGRATE_SYNC); |
1468 | if (ret) { | 1468 | if (ret) { |
1469 | putback_lru_pages(&pagelist); | 1469 | putback_lru_pages(&pagelist); |
1470 | pr_info("soft offline: %#lx: migration failed %d, type %lx\n", | 1470 | pr_info("soft offline: %#lx: migration failed %d, type %lx\n", |