Blob Blame History Raw
From: Steve French <stfrench@microsoft.com>
Date: Mon, 11 Feb 2019 15:38:12 -0600
Subject: [PATCH] smb3: fix bytes_read statistics
Git-commit: d26e2903fc10cfa2d3b8587b9eb8cf7c2a3ff2f5
Patch-mainline: v5.1-rc1
References: bsc#1144333

/proc/fs/cifs/Stats bytes_read was double counting reads when
uncached (ie mounted with cache=none)

Signed-off-by: Steve French <stfrench@microsoft.com>
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
Acked-by: Aurelien Aptel <aaptel@suse.com>
---
 fs/cifs/file.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index 659ce1b92c44..da1f05f4ac0c 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -3533,8 +3533,6 @@ collect_uncached_read_data(struct cifs_aio_ctx *ctx)
 		ctx->total_len = ctx->len - iov_iter_count(to);
 	}
 
-	cifs_stats_bytes_read(tcon, ctx->total_len);
-
 	/* mask nodata case */
 	if (rc == -ENODATA)
 		rc = 0;
-- 
2.16.4