aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/clnt.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sunrpc/clnt.c')
-rw-r--r--net/sunrpc/clnt.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index ab8038db8ef8..7dda32851adb 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -1526,24 +1526,30 @@ struct rpc_task *rpc_call_null(struct rpc_clnt *clnt, struct rpc_cred *cred, int
1526EXPORT_SYMBOL_GPL(rpc_call_null); 1526EXPORT_SYMBOL_GPL(rpc_call_null);
1527 1527
1528#ifdef RPC_DEBUG 1528#ifdef RPC_DEBUG
1529static void rpc_show_header(void)
1530{
1531 printk(KERN_INFO "-pid- proc flgs status -client- -prog- --rqstp- "
1532 "-timeout -rpcwait -action- ---ops--\n");
1533}
1534
1529void rpc_show_tasks(void) 1535void rpc_show_tasks(void)
1530{ 1536{
1531 struct rpc_clnt *clnt; 1537 struct rpc_clnt *clnt;
1532 struct rpc_task *t; 1538 struct rpc_task *t;
1539 int header = 0;
1533 1540
1534 spin_lock(&rpc_client_lock); 1541 spin_lock(&rpc_client_lock);
1535 if (list_empty(&all_clients))
1536 goto out;
1537 printk("-pid- proc flgs status -client- -prog- --rqstp- -timeout "
1538 "-rpcwait -action- ---ops--\n");
1539 list_for_each_entry(clnt, &all_clients, cl_clients) { 1542 list_for_each_entry(clnt, &all_clients, cl_clients) {
1540 if (list_empty(&clnt->cl_tasks))
1541 continue;
1542 spin_lock(&clnt->cl_lock); 1543 spin_lock(&clnt->cl_lock);
1543 list_for_each_entry(t, &clnt->cl_tasks, tk_task) { 1544 list_for_each_entry(t, &clnt->cl_tasks, tk_task) {
1544 const char *rpc_waitq = "none"; 1545 const char *rpc_waitq = "none";
1545 int proc; 1546 int proc;
1546 1547
1548 if (!header) {
1549 rpc_show_header();
1550 header++;
1551 }
1552
1547 if (t->tk_msg.rpc_proc) 1553 if (t->tk_msg.rpc_proc)
1548 proc = t->tk_msg.rpc_proc->p_proc; 1554 proc = t->tk_msg.rpc_proc->p_proc;
1549 else 1555 else
@@ -1563,7 +1569,6 @@ void rpc_show_tasks(void)
1563 } 1569 }
1564 spin_unlock(&clnt->cl_lock); 1570 spin_unlock(&clnt->cl_lock);
1565 } 1571 }
1566out:
1567 spin_unlock(&rpc_client_lock); 1572 spin_unlock(&rpc_client_lock);
1568} 1573}
1569#endif 1574#endif