diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/memory_hotplug.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 3557e8c9e8de..a3797d3fd8a4 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c | |||
@@ -977,15 +977,18 @@ int __ref online_pages(unsigned long pfn, unsigned long nr_pages, int online_typ | |||
977 | zone = page_zone(pfn_to_page(pfn)); | 977 | zone = page_zone(pfn_to_page(pfn)); |
978 | 978 | ||
979 | ret = -EINVAL; | 979 | ret = -EINVAL; |
980 | if ((zone_idx(zone) > ZONE_NORMAL || online_type == ONLINE_MOVABLE) && | 980 | if ((zone_idx(zone) > ZONE_NORMAL || |
981 | online_type == MMOP_ONLINE_MOVABLE) && | ||
981 | !can_online_high_movable(zone)) | 982 | !can_online_high_movable(zone)) |
982 | goto out; | 983 | goto out; |
983 | 984 | ||
984 | if (online_type == ONLINE_KERNEL && zone_idx(zone) == ZONE_MOVABLE) { | 985 | if (online_type == MMOP_ONLINE_KERNEL && |
986 | zone_idx(zone) == ZONE_MOVABLE) { | ||
985 | if (move_pfn_range_left(zone - 1, zone, pfn, pfn + nr_pages)) | 987 | if (move_pfn_range_left(zone - 1, zone, pfn, pfn + nr_pages)) |
986 | goto out; | 988 | goto out; |
987 | } | 989 | } |
988 | if (online_type == ONLINE_MOVABLE && zone_idx(zone) == ZONE_MOVABLE - 1) { | 990 | if (online_type == MMOP_ONLINE_MOVABLE && |
991 | zone_idx(zone) == ZONE_MOVABLE - 1) { | ||
989 | if (move_pfn_range_right(zone, zone + 1, pfn, pfn + nr_pages)) | 992 | if (move_pfn_range_right(zone, zone + 1, pfn, pfn + nr_pages)) |
990 | goto out; | 993 | goto out; |
991 | } | 994 | } |