mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-15 23:25:07 +00:00
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: John Hawkes <hawkes@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
parent
ec535ce154
commit
b9d9506d94
1 changed files with 1 additions and 4 deletions
|
@ -700,12 +700,9 @@ static int nfs_show_stats(struct seq_file *m, struct vfsmount *mnt)
|
||||||
/*
|
/*
|
||||||
* Display superblock I/O counters
|
* Display superblock I/O counters
|
||||||
*/
|
*/
|
||||||
for (cpu = 0; cpu < NR_CPUS; cpu++) {
|
for_each_possible_cpu(cpu) {
|
||||||
struct nfs_iostats *stats;
|
struct nfs_iostats *stats;
|
||||||
|
|
||||||
if (!cpu_possible(cpu))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
preempt_disable();
|
preempt_disable();
|
||||||
stats = per_cpu_ptr(nfss->io_stats, cpu);
|
stats = per_cpu_ptr(nfss->io_stats, cpu);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue