···2929#include <linux/sunrpc/xprtmultipath.h>30303131struct rpc_inode;3232+struct rpc_sysfs_client;32333334/*3435 * The high-level client handle···7271#if IS_ENABLED(CONFIG_SUNRPC_DEBUG)7372 struct dentry *cl_debugfs; /* debugfs directory */7473#endif7474+ struct rpc_sysfs_client *cl_sysfs; /* sysfs directory */7575 /* cl_work is only needed after cl_xpi is no longer used,7676 * and that are of similar size7777 */
···4141#include <trace/events/sunrpc.h>42424343#include "sunrpc.h"4444+#include "sysfs.h"4445#include "netns.h"45464647#if IS_ENABLED(CONFIG_SUNRPC_DEBUG)···328327out:329328 if (pipefs_sb)330329 rpc_put_sb_net(net);330330+ rpc_sysfs_client_destroy(clnt);331331 rpc_clnt_debugfs_unregister(clnt);332332 return err;333333}···425423 /* save the nodename */426424 rpc_clnt_set_nodename(clnt, nodename);427425426426+ rpc_sysfs_client_setup(clnt, xps, rpc_net_ns(clnt));428427 err = rpc_client_register(clnt, args->authflavor, args->client_name);429428 if (err)430429 goto out_no_path;···736733737734 rpc_unregister_client(clnt);738735 __rpc_clnt_remove_pipedir(clnt);736736+ rpc_sysfs_client_destroy(clnt);739737 rpc_clnt_debugfs_unregister(clnt);740738741739 /*···883879 * so they cannot be called in rpciod, so they are handled separately884880 * here.885881 */882882+ rpc_sysfs_client_destroy(clnt);886883 rpc_clnt_debugfs_unregister(clnt);887884 rpc_free_clid(clnt);888885 rpc_clnt_remove_pipedir(clnt);
+10
net/sunrpc/sunrpc_syms.c
···2424#include <linux/sunrpc/xprtsock.h>25252626#include "sunrpc.h"2727+#include "sysfs.h"2728#include "netns.h"28292930unsigned int sunrpc_net_id;···104103 if (err)105104 goto out4;106105106106+ err = rpc_sysfs_init();107107+ if (err)108108+ goto out5;109109+107110 sunrpc_debugfs_init();108111#if IS_ENABLED(CONFIG_SUNRPC_DEBUG)109112 rpc_register_sysctl();···116111 init_socket_xprt(); /* clnt sock transport */117112 return 0;118113114114+out5:115115+ unregister_rpc_pipefs();119116out4:120117 unregister_pernet_subsys(&sunrpc_net_ops);121118out3:···131124static void __exit132125cleanup_sunrpc(void)133126{127127+ rpc_sysfs_exit();134128 rpc_cleanup_clids();129129+ xprt_cleanup_ids();130130+ xprt_multipath_cleanup_ids();135131 rpcauth_remove_module();136132 cleanup_socket_xprt();137133 svc_cleanup_xprt_sock();