summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/stats.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2019-06-11 16:53:33 -0400
committerTrond Myklebust <trond.myklebust@hammerspace.com>2019-07-06 14:54:52 -0400
commitc98ebe2937404d8e6e028ac9cadcf870a6faccc2 (patch)
treee2252a36a3efb93b8cecf95a75594696a9dd4169 /net/sunrpc/stats.c
parent28ade856c0f724b1d74d7d683ec2dc0e98de60ae (diff)
parentb6580ab39b092aac40871fed11faa410c44b1da0 (diff)
downloadlinux-c98ebe2937404d8e6e028ac9cadcf870a6faccc2.tar.gz
linux-c98ebe2937404d8e6e028ac9cadcf870a6faccc2.tar.bz2
linux-c98ebe2937404d8e6e028ac9cadcf870a6faccc2.zip
Merge branch 'multipath_tcp'
Diffstat (limited to 'net/sunrpc/stats.c')
-rw-r--r--net/sunrpc/stats.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/net/sunrpc/stats.c b/net/sunrpc/stats.c
index 48ea776364f8..7c74197c2ecf 100644
--- a/net/sunrpc/stats.c
+++ b/net/sunrpc/stats.c
@@ -240,9 +240,16 @@ static void _print_rpc_iostats(struct seq_file *seq, struct rpc_iostats *stats,
stats->om_error_status);
}
+static int do_print_stats(struct rpc_clnt *clnt, struct rpc_xprt *xprt, void *seqv)
+{
+ struct seq_file *seq = seqv;
+
+ xprt->ops->print_stats(xprt, seq);
+ return 0;
+}
+
void rpc_clnt_show_stats(struct seq_file *seq, struct rpc_clnt *clnt)
{
- struct rpc_xprt *xprt;
unsigned int op, maxproc = clnt->cl_maxproc;
if (!clnt->cl_metrics)
@@ -252,11 +259,7 @@ void rpc_clnt_show_stats(struct seq_file *seq, struct rpc_clnt *clnt)
seq_printf(seq, "p/v: %u/%u (%s)\n",
clnt->cl_prog, clnt->cl_vers, clnt->cl_program->name);
- rcu_read_lock();
- xprt = rcu_dereference(clnt->cl_xprt);
- if (xprt)
- xprt->ops->print_stats(xprt, seq);
- rcu_read_unlock();
+ rpc_clnt_iterate_for_each_xprt(clnt, do_print_stats, seq);
seq_printf(seq, "\tper-op statistics\n");
for (op = 0; op < maxproc; op++) {