diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 793f5cebe665b5cd8c57969e94f3627a8835569e..7f9b40fdf26ea483bc72066c8ddaa05610dc91af 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -3576,7 +3576,7 @@ alloc_flags_nofragment(struct zone *zone, gfp_t gfp_mask) return alloc_flags; if (zone_idx(zone) != ZONE_NORMAL) - goto out; + return alloc_flags; /* * If ZONE_DMA32 exists, assume it is the one after ZONE_NORMAL and @@ -3585,9 +3585,9 @@ alloc_flags_nofragment(struct zone *zone, gfp_t gfp_mask) */ BUILD_BUG_ON(ZONE_NORMAL - ZONE_DMA32 != 1); if (nr_online_nodes > 1 && !populated_zone(--zone)) - goto out; + return alloc_flags; -out: + alloc_flags |= ALLOC_NOFRAGMENT; #endif /* CONFIG_ZONE_DMA32 */ return alloc_flags; }