[PATCH] for_each_possible_cpu: xfs
for_each_cpu() actually iterates across all possible CPUs. We've had mistakes in the past where people were using for_each_cpu() where they should have been iterating across only online or present CPUs. This is inefficient and possibly buggy. We're renaming for_each_cpu() to for_each_possible_cpu() to avoid this in the future. This patch replaces for_each_cpu with for_each_possible_cpu. in xfs. Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Acked-by: Nathan Scott <nathans@sgi.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
parent
d6938d1b27
commit
6f0419e06a
@@ -38,7 +38,7 @@ xfs_stats_clear_proc_handler(
|
||||
|
||||
if (!ret && write && *valp) {
|
||||
printk("XFS Clearing xfsstats\n");
|
||||
for_each_cpu(c) {
|
||||
for_each_possible_cpu(c) {
|
||||
preempt_disable();
|
||||
/* save vn_active, it's a universal truth! */
|
||||
vn_active = per_cpu(xfsstats, c).vn_active;
|
||||
|
Reference in New Issue
Block a user