aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/sunrpc/clnt.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index 1af4f161cda8..68ea6dddcf1e 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -690,6 +690,21 @@ rpc_restart_call(struct rpc_task *task)
690} 690}
691EXPORT_SYMBOL_GPL(rpc_restart_call); 691EXPORT_SYMBOL_GPL(rpc_restart_call);
692 692
693#ifdef RPC_DEBUG
694static const char *rpc_proc_name(const struct rpc_task *task)
695{
696 const struct rpc_procinfo *proc = task->tk_msg.rpc_proc;
697
698 if (proc) {
699 if (proc->p_name)
700 return proc->p_name;
701 else
702 return "NULL";
703 } else
704 return "no proc";
705}
706#endif
707
693/* 708/*
694 * 0. Initial state 709 * 0. Initial state
695 * 710 *
@@ -701,9 +716,9 @@ call_start(struct rpc_task *task)
701{ 716{
702 struct rpc_clnt *clnt = task->tk_client; 717 struct rpc_clnt *clnt = task->tk_client;
703 718
704 dprintk("RPC: %5u call_start %s%d proc %d (%s)\n", task->tk_pid, 719 dprintk("RPC: %5u call_start %s%d proc %s (%s)\n", task->tk_pid,
705 clnt->cl_protname, clnt->cl_vers, 720 clnt->cl_protname, clnt->cl_vers,
706 task->tk_msg.rpc_proc->p_proc, 721 rpc_proc_name(task),
707 (RPC_IS_ASYNC(task) ? "async" : "sync")); 722 (RPC_IS_ASYNC(task) ? "async" : "sync"));
708 723
709 /* Increment call count */ 724 /* Increment call count */
@@ -1432,10 +1447,10 @@ call_verify(struct rpc_task *task)
1432 error = -EPROTONOSUPPORT; 1447 error = -EPROTONOSUPPORT;
1433 goto out_err; 1448 goto out_err;
1434 case RPC_PROC_UNAVAIL: 1449 case RPC_PROC_UNAVAIL:
1435 dprintk("RPC: %5u %s: proc %p unsupported by program %u, " 1450 dprintk("RPC: %5u %s: proc %s unsupported by program %u, "
1436 "version %u on server %s\n", 1451 "version %u on server %s\n",
1437 task->tk_pid, __func__, 1452 task->tk_pid, __func__,
1438 task->tk_msg.rpc_proc, 1453 rpc_proc_name(task),
1439 task->tk_client->cl_prog, 1454 task->tk_client->cl_prog,
1440 task->tk_client->cl_vers, 1455 task->tk_client->cl_vers,
1441 task->tk_client->cl_server); 1456 task->tk_client->cl_server);