Extract the zone number directly from the folio instead of using the folio's zone number to look up the zone and asking the zone what its number is. Signed-off-by: Matthew Wilcox (Oracle) --- mm/migrate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/migrate.c b/mm/migrate.c index c0e9f15be2a2..cc8d71bd116c 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -2190,7 +2190,7 @@ struct folio *alloc_migration_target(struct folio *src, unsigned long private) gfp_mask |= GFP_TRANSHUGE; order = folio_order(src); } - zidx = zone_idx(folio_zone(src)); + zidx = folio_zonenum(src); if (is_highmem_idx(zidx) || zidx == ZONE_MOVABLE) gfp_mask |= __GFP_HIGHMEM; -- 2.47.2