diff options
Diffstat (limited to 'mm/memory_hotplug.c')
-rw-r--r-- | mm/memory_hotplug.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index b35016156c19..f9ac0955e10a 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c | |||
@@ -756,13 +756,6 @@ static unsigned long scan_lru_pages(unsigned long start, unsigned long end) | |||
756 | return 0; | 756 | return 0; |
757 | } | 757 | } |
758 | 758 | ||
759 | static struct page * | ||
760 | hotremove_migrate_alloc(struct page *page, unsigned long private, int **x) | ||
761 | { | ||
762 | /* This should be improooooved!! */ | ||
763 | return alloc_page(GFP_HIGHUSER_MOVABLE); | ||
764 | } | ||
765 | |||
766 | #define NR_OFFLINE_AT_ONCE_PAGES (256) | 759 | #define NR_OFFLINE_AT_ONCE_PAGES (256) |
767 | static int | 760 | static int |
768 | do_migrate_range(unsigned long start_pfn, unsigned long end_pfn) | 761 | do_migrate_range(unsigned long start_pfn, unsigned long end_pfn) |
@@ -813,8 +806,12 @@ do_migrate_range(unsigned long start_pfn, unsigned long end_pfn) | |||
813 | putback_lru_pages(&source); | 806 | putback_lru_pages(&source); |
814 | goto out; | 807 | goto out; |
815 | } | 808 | } |
816 | /* this function returns # of failed pages */ | 809 | |
817 | ret = migrate_pages(&source, hotremove_migrate_alloc, 0, | 810 | /* |
811 | * alloc_migrate_target should be improooooved!! | ||
812 | * migrate_pages returns # of failed pages. | ||
813 | */ | ||
814 | ret = migrate_pages(&source, alloc_migrate_target, 0, | ||
818 | true, MIGRATE_SYNC); | 815 | true, MIGRATE_SYNC); |
819 | if (ret) | 816 | if (ret) |
820 | putback_lru_pages(&source); | 817 | putback_lru_pages(&source); |