diff options
-rw-r--r-- | mm/page_alloc.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 7cff958e7813..379618747deb 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -1169,12 +1169,11 @@ EXPORT_SYMBOL(nr_pagecache); | |||
1169 | DEFINE_PER_CPU(long, nr_pagecache_local) = 0; | 1169 | DEFINE_PER_CPU(long, nr_pagecache_local) = 0; |
1170 | #endif | 1170 | #endif |
1171 | 1171 | ||
1172 | void __get_page_state(struct page_state *ret, int nr, cpumask_t *cpumask) | 1172 | static void __get_page_state(struct page_state *ret, int nr, cpumask_t *cpumask) |
1173 | { | 1173 | { |
1174 | int cpu = 0; | 1174 | int cpu = 0; |
1175 | 1175 | ||
1176 | memset(ret, 0, sizeof(*ret)); | 1176 | memset(ret, 0, sizeof(*ret)); |
1177 | cpus_and(*cpumask, *cpumask, cpu_online_map); | ||
1178 | 1177 | ||
1179 | cpu = first_cpu(*cpumask); | 1178 | cpu = first_cpu(*cpumask); |
1180 | while (cpu < NR_CPUS) { | 1179 | while (cpu < NR_CPUS) { |
@@ -1227,7 +1226,7 @@ unsigned long __read_page_state(unsigned long offset) | |||
1227 | unsigned long ret = 0; | 1226 | unsigned long ret = 0; |
1228 | int cpu; | 1227 | int cpu; |
1229 | 1228 | ||
1230 | for_each_online_cpu(cpu) { | 1229 | for_each_cpu(cpu) { |
1231 | unsigned long in; | 1230 | unsigned long in; |
1232 | 1231 | ||
1233 | in = (unsigned long)&per_cpu(page_states, cpu) + offset; | 1232 | in = (unsigned long)&per_cpu(page_states, cpu) + offset; |