]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mm/page_alloc: split per cpu page lists and zone stats -fix -fix
authorMel Gorman <mgorman@techsingularity.net>
Wed, 2 Jun 2021 03:52:36 +0000 (13:52 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 2 Jun 2021 03:52:36 +0000 (13:52 +1000)
mm/ is not W=1 clean for make allnoconfig but this patch accidentally made
it worse for i386 with the warning

  mm/vmstat.c: In function `refresh_cpu_vm_stats':
  mm/vmstat.c:785:34: warning: unused variable `pcp' [-Wunused-variable]
     struct per_cpu_pages __percpu *pcp = zone->per_cpu_pageset;
                                    ^~~

This is a second fix to the mmotm patch
mm-page_alloc-split-per-cpu-page-lists-and-zone-stats.patch.

Link: https://lkml.kernel.org/r/20210516140705.GB3735@techsingularity.net
Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
mm/vmstat.c

index a2c3f58253bece12be4f63a7c6fb3198d8b2a0de..f1400ba46bebc355dff7ee852d20fe7b92638ab9 100644 (file)
@@ -782,7 +782,9 @@ static int refresh_cpu_vm_stats(bool do_pagesets)
 
        for_each_populated_zone(zone) {
                struct per_cpu_zonestat __percpu *pzstats = zone->per_cpu_zonestats;
+#ifdef CONFIG_NUMA
                struct per_cpu_pages __percpu *pcp = zone->per_cpu_pageset;
+#endif
 
                for (i = 0; i < NR_VM_ZONE_STAT_ITEMS; i++) {
                        int v;