aboutsummaryrefslogtreecommitdiffstats
path: root/mm/allocpercpu.c
diff options
context:
space:
mode:
authorMike Travis <travis@sgi.com>2008-04-04 21:11:12 -0400
committerIngo Molnar <mingo@elte.hu>2008-04-19 13:44:58 -0400
commitd366f8cbc16882e93538d9a52423c2f50dad7c06 (patch)
tree64202cd91a942dc3ea9b88adb6da562c2fb191a8 /mm/allocpercpu.c
parentf46bdf2db25dfaff3b611c9711705645cdb03acc (diff)
cpumask: Cleanup more uses of CPU_MASK and NODE_MASK
* Replace usages of CPU_MASK_NONE, CPU_MASK_ALL, NODE_MASK_NONE, NODE_MASK_ALL to reduce stack requirements for large NR_CPUS and MAXNODES counts. * In some cases, the cpumask variable was initialized but then overwritten with another value. This is the case for changes like this: - cpumask_t oldmask = CPU_MASK_ALL; + cpumask_t oldmask; Signed-off-by: Mike Travis <travis@sgi.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'mm/allocpercpu.c')
-rw-r--r--mm/allocpercpu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/allocpercpu.c b/mm/allocpercpu.c
index b0012e27fea8..f4026bae6eed 100644
--- a/mm/allocpercpu.c
+++ b/mm/allocpercpu.c
@@ -82,9 +82,10 @@ EXPORT_SYMBOL_GPL(percpu_populate);
82int __percpu_populate_mask(void *__pdata, size_t size, gfp_t gfp, 82int __percpu_populate_mask(void *__pdata, size_t size, gfp_t gfp,
83 cpumask_t *mask) 83 cpumask_t *mask)
84{ 84{
85 cpumask_t populated = CPU_MASK_NONE; 85 cpumask_t populated;
86 int cpu; 86 int cpu;
87 87
88 cpus_clear(populated);
88 for_each_cpu_mask(cpu, *mask) 89 for_each_cpu_mask(cpu, *mask)
89 if (unlikely(!percpu_populate(__pdata, size, gfp, cpu))) { 90 if (unlikely(!percpu_populate(__pdata, size, gfp, cpu))) {
90 __percpu_depopulate_mask(__pdata, &populated); 91 __percpu_depopulate_mask(__pdata, &populated);