]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mm-page_alloc-add-a-missing-mm_page_alloc_zone_locked-tracepoint-fix
authorAndrew Morton <akpm@linux-foundation.org>
Thu, 31 Dec 2020 22:03:52 +0000 (22:03 +0000)
committerJohannes Weiner <hannes@cmpxchg.org>
Thu, 31 Dec 2020 22:03:52 +0000 (22:03 +0000)
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 <liu.hailong6@zte.com.cn>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/page_alloc.c

index fd741b0caca3a59ae91cff95efc5322222ffc923..027f6481ba59bca36ff024dbbf62cfa3f7ef04e9 100644 (file)
@@ -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)) {