diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-04-20 18:36:05 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-04-20 18:36:05 -0400 |
commit | 857c68f733eea07f11a061caea43a38fed61adb7 (patch) | |
tree | 4567a9e91f717b22143ac1ccb0fb5323ac15afd3 /mm/slob.c | |
parent | 4741c336d27dec3ea68a35659abb8dc82b142388 (diff) | |
parent | 402a26f0c040077ed6f941eefac5a6971f0d5f40 (diff) | |
download | op-kernel-dev-857c68f733eea07f11a061caea43a38fed61adb7.zip op-kernel-dev-857c68f733eea07f11a061caea43a38fed61adb7.tar.gz |
Merge branch 'master'
Diffstat (limited to 'mm/slob.c')
-rw-r--r-- | mm/slob.c | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -354,9 +354,7 @@ void *__alloc_percpu(size_t size) if (!pdata) return NULL; - for (i = 0; i < NR_CPUS; i++) { - if (!cpu_possible(i)) - continue; + for_each_possible_cpu(i) { pdata->ptrs[i] = kmalloc(size, GFP_KERNEL); if (!pdata->ptrs[i]) goto unwind_oom; @@ -383,11 +381,9 @@ free_percpu(const void *objp) int i; struct percpu_data *p = (struct percpu_data *) (~(unsigned long) objp); - for (i = 0; i < NR_CPUS; i++) { - if (!cpu_possible(i)) - continue; + for_each_possible_cpu(i) kfree(p->ptrs[i]); - } + kfree(p); } EXPORT_SYMBOL(free_percpu); |