diff --git a/mm/page_alloc.c b/mm/page_alloc.c index a0cf1738bdb2..7c01170eeca5 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -8738,7 +8738,7 @@ int alloc_contig_range(unsigned long start, unsigned long end, * -EBUSY is not accidentally used or returned to caller. */ ret = __alloc_contig_migrate_range(&cc, start, end, info); - if (ret && ret != -EBUSY) + if (ret && (ret != -EBUSY || (gfp_mask & __GFP_NORETRY))) goto done; ret =0;