提交 b9d9506d 编写于 作者: J John Hawkes 提交者: Trond Myklebust

NFS: nfs_show_stats; for_each_possible_cpu(), not NR_CPUS

Convert a for-loop that explicitly references "NR_CPUS" into the
potentially more efficient for_each_possible_cpu() construct.
Signed-off-by: NJohn Hawkes <hawkes@sgi.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
上级 ec535ce1
......@@ -700,12 +700,9 @@ static int nfs_show_stats(struct seq_file *m, struct vfsmount *mnt)
/*
* Display superblock I/O counters
*/
for (cpu = 0; cpu < NR_CPUS; cpu++) {
for_each_possible_cpu(cpu) {
struct nfs_iostats *stats;
if (!cpu_possible(cpu))
continue;
preempt_disable();
stats = per_cpu_ptr(nfss->io_stats, cpu);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册