summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorChristoph Lameter <cl@gentwo.org>2014-07-31 09:28:28 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2014-07-31 09:28:28 +1000
commitf9054025fb65d0802098f18b153e4d720acd126e (patch)
tree28045265fc87653881eff04dc4062a84bcaeffa0 /mm
parent95915bd659989499407d261f3394c72632434770 (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@qti.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.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mm/vmstat.c b/mm/vmstat.c
index a3a5cced5aac..c4d42e27ca9e 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;
-static struct cpumask *cpu_stat_off;
+static 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,