From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751651AbdFGGnK (ORCPT ); Wed, 7 Jun 2017 02:43:10 -0400 Received: from hqemgate15.nvidia.com ([216.228.121.64]:5691 "EHLO hqemgate15.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751634AbdFGGnI (ORCPT ); Wed, 7 Jun 2017 02:43:08 -0400 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Tue, 06 Jun 2017 23:43:08 -0700 From: Tuo Chen Peng To: , CC: , , Tuo Chen Peng Subject: [PATCH] nfs: Fix fscache stat printing in nfs_show_stats() Date: Tue, 6 Jun 2017 23:42:44 -0700 Message-ID: <1496817764-3641-1-git-send-email-tpeng@nvidia.com> X-Mailer: git-send-email 2.7.4 X-NVConfidentiality: public MIME-Version: 1.0 X-Originating-IP: [172.16.174.18] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL108.nvidia.com (172.18.146.13) Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- fs/nfs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfs/super.c b/fs/nfs/super.c index eceb4ea..b417639 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c @@ -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"); -- 2.7.4