Extract the zone number directly from the page instead of using the page's zone number to look up the zone and asking the zone what its number is. Signed-off-by: Matthew Wilcox (Oracle) --- mm/memory_hotplug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 0be83039c3b5..80713bdf13dc 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -2327,7 +2327,7 @@ static int try_offline_memory_block(struct memory_block *mem, void *arg) * by offlining code ... so we don't care about that. */ page = pfn_to_online_page(section_nr_to_pfn(mem->start_section_nr)); - if (page && zone_idx(page_zone(page)) == ZONE_MOVABLE) + if (page && page_zonenum(page) == ZONE_MOVABLE) online_type = MMOP_ONLINE_MOVABLE; rc = device_offline(&mem->dev); -- 2.47.2