From: Andrew Morton Date: Thu, 31 Dec 2020 22:03:52 +0000 (+0000) Subject: mm-page_alloc-add-a-missing-mm_page_alloc_zone_locked-tracepoint-fix X-Git-Tag: howlett/maple_spf/20210104~186 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=e2c50f99a4d39b44b54af7c200dc840372bd8acd;p=users%2Fjedix%2Flinux-maple.git mm-page_alloc-add-a-missing-mm_page_alloc_zone_locked-tracepoint-fix use IS_ENABLED() to suppress warning mm/page_alloc.c: In function ‘__rmqueue’: mm/page_alloc.c:2889:1: warning: label ‘out’ defined but not used [-Wunused-label] out: ^~~ Cc: Hailong liu Signed-off-by: Andrew Morton --- diff --git a/mm/page_alloc.c b/mm/page_alloc.c index fd741b0caca3..027f6481ba59 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -2862,20 +2862,20 @@ __rmqueue(struct zone *zone, unsigned int order, int migratetype, { struct page *page; -#ifdef CONFIG_CMA - /* - * Balance movable allocations between regular and CMA areas by - * allocating from CMA when over half of the zone's free memory - * is in the CMA area. - */ - if (alloc_flags & ALLOC_CMA && - zone_page_state(zone, NR_FREE_CMA_PAGES) > - zone_page_state(zone, NR_FREE_PAGES) / 2) { - page = __rmqueue_cma_fallback(zone, order); - if (page) - goto out; + if (IS_ENABLED(CONFIG_CMA)) { + /* + * Balance movable allocations between regular and CMA areas by + * allocating from CMA when over half of the zone's free memory + * is in the CMA area. + */ + if (alloc_flags & ALLOC_CMA && + zone_page_state(zone, NR_FREE_CMA_PAGES) > + zone_page_state(zone, NR_FREE_PAGES) / 2) { + page = __rmqueue_cma_fallback(zone, order); + if (page) + goto out; + } } -#endif retry: page = __rmqueue_smallest(zone, order, migratetype); if (unlikely(!page)) {