NFS: nfs_show_stats; for_each_possible_cpu(), not NR_CPUS
authorJohn Hawkes <hawkes@sgi.com>
Wed, 19 Apr 2006 17:06:20 +0000 (13:06 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 19 Apr 2006 17:06:20 +0000 (13:06 -0400)
Convert a for-loop that explicitly references "NR_CPUS" into the
potentially more efficient for_each_possible_cpu() construct.

Signed-off-by: John Hawkes <hawkes@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/inode.c

index 2f7656b911b66df6f03a96561c2f03534ffa4241..d0b991a92327f32941a454865c6aed187523d52e 100644 (file)
@@ -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);