aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memory_hotplug.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/memory_hotplug.c')
-rw-r--r--mm/memory_hotplug.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index 72195602ded5..571130ee66d7 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -205,7 +205,7 @@ static void grow_zone_span(struct zone *zone, unsigned long start_pfn,
205 zone_span_writelock(zone); 205 zone_span_writelock(zone);
206 206
207 old_zone_end_pfn = zone->zone_start_pfn + zone->spanned_pages; 207 old_zone_end_pfn = zone->zone_start_pfn + zone->spanned_pages;
208 if (start_pfn < zone->zone_start_pfn) 208 if (!zone->spanned_pages || start_pfn < zone->zone_start_pfn)
209 zone->zone_start_pfn = start_pfn; 209 zone->zone_start_pfn = start_pfn;
210 210
211 zone->spanned_pages = max(old_zone_end_pfn, end_pfn) - 211 zone->spanned_pages = max(old_zone_end_pfn, end_pfn) -
@@ -220,7 +220,7 @@ static void grow_pgdat_span(struct pglist_data *pgdat, unsigned long start_pfn,
220 unsigned long old_pgdat_end_pfn = 220 unsigned long old_pgdat_end_pfn =
221 pgdat->node_start_pfn + pgdat->node_spanned_pages; 221 pgdat->node_start_pfn + pgdat->node_spanned_pages;
222 222
223 if (start_pfn < pgdat->node_start_pfn) 223 if (!pgdat->node_spanned_pages || start_pfn < pgdat->node_start_pfn)
224 pgdat->node_start_pfn = start_pfn; 224 pgdat->node_start_pfn = start_pfn;
225 225
226 pgdat->node_spanned_pages = max(old_pgdat_end_pfn, end_pfn) - 226 pgdat->node_spanned_pages = max(old_pgdat_end_pfn, end_pfn) -