diff options
-rw-r--r-- | mm/page_alloc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index fd47494cb989..0b98f428b07b 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -1204,6 +1204,7 @@ static void __get_page_state(struct page_state *ret, int nr, cpumask_t *cpumask) | |||
1204 | int cpu = 0; | 1204 | int cpu = 0; |
1205 | 1205 | ||
1206 | memset(ret, 0, sizeof(*ret)); | 1206 | memset(ret, 0, sizeof(*ret)); |
1207 | cpus_and(*cpumask, *cpumask, cpu_online_map); | ||
1207 | 1208 | ||
1208 | cpu = first_cpu(*cpumask); | 1209 | cpu = first_cpu(*cpumask); |
1209 | while (cpu < NR_CPUS) { | 1210 | while (cpu < NR_CPUS) { |
@@ -1256,7 +1257,7 @@ unsigned long read_page_state_offset(unsigned long offset) | |||
1256 | unsigned long ret = 0; | 1257 | unsigned long ret = 0; |
1257 | int cpu; | 1258 | int cpu; |
1258 | 1259 | ||
1259 | for_each_cpu(cpu) { | 1260 | for_each_online_cpu(cpu) { |
1260 | unsigned long in; | 1261 | unsigned long in; |
1261 | 1262 | ||
1262 | in = (unsigned long)&per_cpu(page_states, cpu) + offset; | 1263 | in = (unsigned long)&per_cpu(page_states, cpu) + offset; |