summaryrefslogtreecommitdiffstats
path: root/mm/slob.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-04-20 18:36:05 -0400
committerJeff Garzik <jeff@garzik.org>2006-04-20 18:36:05 -0400
commit857c68f733eea07f11a061caea43a38fed61adb7 (patch)
tree4567a9e91f717b22143ac1ccb0fb5323ac15afd3 /mm/slob.c
parent4741c336d27dec3ea68a35659abb8dc82b142388 (diff)
parent402a26f0c040077ed6f941eefac5a6971f0d5f40 (diff)
downloadop-kernel-dev-857c68f733eea07f11a061caea43a38fed61adb7.zip
op-kernel-dev-857c68f733eea07f11a061caea43a38fed61adb7.tar.gz
Merge branch 'master'
Diffstat (limited to 'mm/slob.c')
-rw-r--r--mm/slob.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/mm/slob.c b/mm/slob.c
index 9bcc7e2..a68255b 100644
--- a/mm/slob.c
+++ b/mm/slob.c
@@ -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);
OpenPOWER on IntegriCloud