Messages in this thread Patch in this message | | | Date | Thu, 16 Mar 2006 12:41:13 +0900 | From | KAMEZAWA Hiroyuki <> | Subject | [PATCH] for_each_possible_cpu [19/19] xfs |
| |
This patch replaces for_each_cpu with for_each_possible_cpu. in xfs.
Signed-Off-By: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Index: linux-2.6.16-rc6-mm1/fs/xfs/linux-2.6/xfs_sysctl.c =================================================================== --- linux-2.6.16-rc6-mm1.orig/fs/xfs/linux-2.6/xfs_sysctl.c +++ linux-2.6.16-rc6-mm1/fs/xfs/linux-2.6/xfs_sysctl.c @@ -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; Index: linux-2.6.16-rc6-mm1/fs/xfs/linux-2.6/xfs_stats.c =================================================================== --- linux-2.6.16-rc6-mm1.orig/fs/xfs/linux-2.6/xfs_stats.c +++ linux-2.6.16-rc6-mm1/fs/xfs/linux-2.6/xfs_stats.c @@ -62,7 +62,7 @@ xfs_read_xfsstats( while (j < xstats[i].endpoint) { val = 0; /* sum over all cpus */ - for_each_cpu(c) + for_each_possible_cpu(c) val += *(((__u32*)&per_cpu(xfsstats, c) + j)); len += sprintf(buffer + len, " %u", val); j++; @@ -70,7 +70,7 @@ xfs_read_xfsstats( buffer[len++] = '\n'; } /* extra precision counters */ - for_each_cpu(i) { + for_each_possible_cpu(i) { xs_xstrat_bytes += per_cpu(xfsstats, i).xs_xstrat_bytes; xs_write_bytes += per_cpu(xfsstats, i).xs_write_bytes; xs_read_bytes += per_cpu(xfsstats, i).xs_read_bytes; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |