diff options
author | Joonsoo Kim <js1304@gmail.com> | 2012-07-30 17:39:04 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-30 20:25:11 -0400 |
commit | dc32f63453f56d07a1073a697dcd843dd3098c09 (patch) | |
tree | 17c0467c5c638e42213b51abddf04f22b03a6ae6 /mm/memory-failure.c | |
parent | a410963ba4c0c768302f0298e258b1ee940e8316 (diff) |
mm: fix wrong argument of migrate_huge_pages() in soft_offline_huge_page()
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>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.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 de4ce7058450..6de0d613bbe6 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c | |||
@@ -1433,8 +1433,8 @@ static int soft_offline_huge_page(struct page *page, int flags) | |||
1433 | /* Keep page count to indicate a given hugepage is isolated. */ | 1433 | /* Keep page count to indicate a given hugepage is isolated. */ |
1434 | 1434 | ||
1435 | list_add(&hpage->lru, &pagelist); | 1435 | list_add(&hpage->lru, &pagelist); |
1436 | ret = migrate_huge_pages(&pagelist, new_page, MPOL_MF_MOVE_ALL, 0, | 1436 | ret = migrate_huge_pages(&pagelist, new_page, MPOL_MF_MOVE_ALL, false, |
1437 | true); | 1437 | MIGRATE_SYNC); |
1438 | if (ret) { | 1438 | if (ret) { |
1439 | struct page *page1, *page2; | 1439 | struct page *page1, *page2; |
1440 | list_for_each_entry_safe(page1, page2, &pagelist, lru) | 1440 | list_for_each_entry_safe(page1, page2, &pagelist, lru) |
@@ -1563,7 +1563,7 @@ int soft_offline_page(struct page *page, int flags) | |||
1563 | page_is_file_cache(page)); | 1563 | page_is_file_cache(page)); |
1564 | list_add(&page->lru, &pagelist); | 1564 | list_add(&page->lru, &pagelist); |
1565 | ret = migrate_pages(&pagelist, new_page, MPOL_MF_MOVE_ALL, | 1565 | ret = migrate_pages(&pagelist, new_page, MPOL_MF_MOVE_ALL, |
1566 | 0, MIGRATE_SYNC); | 1566 | false, MIGRATE_SYNC); |
1567 | if (ret) { | 1567 | if (ret) { |
1568 | putback_lru_pages(&pagelist); | 1568 | putback_lru_pages(&pagelist); |
1569 | pr_info("soft offline: %#lx: migration failed %d, type %lx\n", | 1569 | pr_info("soft offline: %#lx: migration failed %d, type %lx\n", |