[PATCH] for_each_possible_cpu: fixes for generic part
replaces for_each_cpu with for_each_possible_cpu(). Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:

committed by
Linus Torvalds

부모
631d6747e1
커밋
0a94502277
@@ -3311,7 +3311,7 @@ void *__alloc_percpu(size_t size)
|
||||
* and we have no way of figuring out how to fix the array
|
||||
* that we have allocated then....
|
||||
*/
|
||||
for_each_cpu(i) {
|
||||
for_each_possible_cpu(i) {
|
||||
int node = cpu_to_node(i);
|
||||
|
||||
if (node_online(node))
|
||||
@@ -3398,7 +3398,7 @@ void free_percpu(const void *objp)
|
||||
/*
|
||||
* We allocate for all cpus so we cannot use for online cpu here.
|
||||
*/
|
||||
for_each_cpu(i)
|
||||
for_each_possible_cpu(i)
|
||||
kfree(p->ptrs[i]);
|
||||
kfree(p);
|
||||
}
|
||||
|
Reference in New Issue
Block a user