diff options
author | Christoph Lameter <cl@gentwo.org> | 2014-07-17 10:58:04 +1000 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2014-07-17 10:58:04 +1000 |
commit | a0f1cee80b09cf02472022cfe0251abf5c79a428 (patch) | |
tree | 1b853b1e0a1584fed849502ba87d3fd2a99ced23 /mm | |
parent | 41d58fa9951ad4a462ed7deeb7bfb0e90680ef48 (diff) |
on demand vmstat: Do not open code alloc_cpumask_var
Signed-off-by: Christoph Lameter <cl@linux.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Gilad Ben-Yossef <gilad@benyossef.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tejun Heo <tj@kernel.org>
Cc: John Stultz <johnstul@us.ibm.com>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Minchan Kim <minchan.kim@gmail.com>
Cc: Hakan Akkan <hakanakkan@gmail.com>
Cc: Max Krasnyansky <maxk@qualcomm.com>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/vmstat.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mm/vmstat.c b/mm/vmstat.c index ababac7447a8..c1cae63e79fb 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c @@ -1245,7 +1245,7 @@ static const struct file_operations proc_vmstat_file_operations = { #ifdef CONFIG_SMP static DEFINE_PER_CPU(struct delayed_work, vmstat_work); int sysctl_stat_interval __read_mostly = HZ; -struct cpumask *cpu_stat_off; +cpumask_var_t cpu_stat_off; static void vmstat_update(struct work_struct *w) { @@ -1339,7 +1339,8 @@ static void __init start_shepherd_timer(void) INIT_DEFERRABLE_WORK(per_cpu_ptr(&vmstat_work, cpu), vmstat_update); - cpu_stat_off = kmalloc(cpumask_size(), GFP_KERNEL); + if (!alloc_cpumask_var(&cpu_stat_off, GFP_KERNEL)) + BUG(); cpumask_copy(cpu_stat_off, cpu_online_mask); schedule_delayed_work(&shepherd, |