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.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index 9acd6ce88db7..05da12a33945 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -42,7 +42,7 @@
42#include "sunrpc.h" 42#include "sunrpc.h"
43#include "netns.h" 43#include "netns.h"
44 44
45#ifdef RPC_DEBUG 45#if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
46# define RPCDBG_FACILITY RPCDBG_CALL 46# define RPCDBG_FACILITY RPCDBG_CALL
47#endif 47#endif
48 48
@@ -305,6 +305,10 @@ static int rpc_client_register(struct rpc_clnt *clnt,
305 struct super_block *pipefs_sb; 305 struct super_block *pipefs_sb;
306 int err; 306 int err;
307 307
308 err = rpc_clnt_debugfs_register(clnt);
309 if (err)
310 return err;
311
308 pipefs_sb = rpc_get_sb_net(net); 312 pipefs_sb = rpc_get_sb_net(net);
309 if (pipefs_sb) { 313 if (pipefs_sb) {
310 err = rpc_setup_pipedir(pipefs_sb, clnt); 314 err = rpc_setup_pipedir(pipefs_sb, clnt);
@@ -331,6 +335,7 @@ err_auth:
331out: 335out:
332 if (pipefs_sb) 336 if (pipefs_sb)
333 rpc_put_sb_net(net); 337 rpc_put_sb_net(net);
338 rpc_clnt_debugfs_unregister(clnt);
334 return err; 339 return err;
335} 340}
336 341
@@ -670,6 +675,7 @@ int rpc_switch_client_transport(struct rpc_clnt *clnt,
670 675
671 rpc_unregister_client(clnt); 676 rpc_unregister_client(clnt);
672 __rpc_clnt_remove_pipedir(clnt); 677 __rpc_clnt_remove_pipedir(clnt);
678 rpc_clnt_debugfs_unregister(clnt);
673 679
674 /* 680 /*
675 * A new transport was created. "clnt" therefore 681 * A new transport was created. "clnt" therefore
@@ -771,6 +777,7 @@ rpc_free_client(struct rpc_clnt *clnt)
771 rcu_dereference(clnt->cl_xprt)->servername); 777 rcu_dereference(clnt->cl_xprt)->servername);
772 if (clnt->cl_parent != clnt) 778 if (clnt->cl_parent != clnt)
773 parent = clnt->cl_parent; 779 parent = clnt->cl_parent;
780 rpc_clnt_debugfs_unregister(clnt);
774 rpc_clnt_remove_pipedir(clnt); 781 rpc_clnt_remove_pipedir(clnt);
775 rpc_unregister_client(clnt); 782 rpc_unregister_client(clnt);
776 rpc_free_iostats(clnt->cl_metrics); 783 rpc_free_iostats(clnt->cl_metrics);
@@ -1396,8 +1403,9 @@ rpc_restart_call(struct rpc_task *task)
1396} 1403}
1397EXPORT_SYMBOL_GPL(rpc_restart_call); 1404EXPORT_SYMBOL_GPL(rpc_restart_call);
1398 1405
1399#ifdef RPC_DEBUG 1406#if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
1400static const char *rpc_proc_name(const struct rpc_task *task) 1407const char
1408*rpc_proc_name(const struct rpc_task *task)
1401{ 1409{
1402 const struct rpc_procinfo *proc = task->tk_msg.rpc_proc; 1410 const struct rpc_procinfo *proc = task->tk_msg.rpc_proc;
1403 1411
@@ -2421,7 +2429,7 @@ struct rpc_task *rpc_call_null(struct rpc_clnt *clnt, struct rpc_cred *cred, int
2421} 2429}
2422EXPORT_SYMBOL_GPL(rpc_call_null); 2430EXPORT_SYMBOL_GPL(rpc_call_null);
2423 2431
2424#ifdef RPC_DEBUG 2432#if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
2425static void rpc_show_header(void) 2433static void rpc_show_header(void)
2426{ 2434{
2427 printk(KERN_INFO "-pid- flgs status -client- --rqstp- " 2435 printk(KERN_INFO "-pid- flgs status -client- --rqstp- "