nfs: Fix fscache stat printing in nfs_show_stats()
authorTuo Chen Peng <tpeng@nvidia.com>
Wed, 7 Jun 2017 06:42:44 +0000 (23:42 -0700)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Thu, 13 Jul 2017 19:58:27 +0000 (15:58 -0400)
nfs_show_stats() was incorrectly reading statistics for bytes when printing that
for fsc. It caused files like /proc/self/mountstats to report incorrect fsc
statistics for NFS mounts.

Signed-off-by: Tuo Chen Peng <tpeng@nvidia.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/super.c

index eceb4eabb064953f830d1bf97a5d0daeecdd27f0..b4176393f049ff3d15d4c238a88af365c14b6692 100644 (file)
@@ -879,7 +879,7 @@ int nfs_show_stats(struct seq_file *m, struct dentry *root)
        if (nfss->options & NFS_OPTION_FSCACHE) {
                seq_printf(m, "\n\tfsc:\t");
                for (i = 0; i < __NFSIOS_FSCACHEMAX; i++)
-                       seq_printf(m, "%Lu ", totals.bytes[i]);
+                       seq_printf(m, "%Lu ", totals.fscache[i]);
        }
 #endif
        seq_printf(m, "\n");