summary refs log tree commit diff
path: root/net/sunrpc/stats.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-05-08 23:27:10 +0200
committerChristoph Hellwig <hch@lst.de>2017-05-15 17:42:18 +0200
commit1c5876ddbdb401f814ef717394826e7dfb6704d4 (patch)
tree225ae8fa49b447a2c7ace97f861031c7230ff76f /net/sunrpc/stats.c
parentcdfa31e93fd228e197cc5bb31f0156117cea2156 (diff)
downloadlinux-1c5876ddbdb401f814ef717394826e7dfb6704d4.tar.gz
sunrpc: move p_count out of struct rpc_procinfo
p_count is the only writeable memeber of struct rpc_procinfo, which is
a good candidate to be const-ified as it contains function pointers.

This patch moves it into out out struct rpc_procinfo, and into a
separate writable array that is pointed to by struct rpc_version and
indexed by p_statidx.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'net/sunrpc/stats.c')
-rw-r--r--net/sunrpc/stats.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/sunrpc/stats.c b/net/sunrpc/stats.c
index caeb01ad2b5a..91c84d18bf9a 100644
--- a/net/sunrpc/stats.c
+++ b/net/sunrpc/stats.c
@@ -55,8 +55,7 @@ static int rpc_proc_show(struct seq_file *seq, void *v) {
 		seq_printf(seq, "proc%u %u",
 					vers->number, vers->nrprocs);
 		for (j = 0; j < vers->nrprocs; j++)
-			seq_printf(seq, " %u",
-					vers->procs[j].p_count);
+			seq_printf(seq, " %u", vers->counts[j]);
 		seq_putc(seq, '\n');
 	}
 	return 0;