static int __init init_sunrpc(void) { int err = register_rpc_pipefs(); if (err) goto out; err = rpc_init_mempool(); if (err) goto out2; err = rpcauth_init_module(); if (err) goto out3; cache_initialize(); err = register_pernet_subsys(&sunrpc_net_ops); if (err) goto out4; #ifdef RPC_DEBUG rpc_register_sysctl(); #endif cache_register(&unix_gid_cache); svc_init_xprt_sock(); /* svc sock transport */ init_socket_xprt(); /* clnt sock transport */ return 0; out4: rpcauth_remove_module(); out3: rpc_destroy_mempool(); out2: unregister_rpc_pipefs(); out: return err; }
static void __exit cleanup_sunrpc(void) { rpcauth_remove_module(); cleanup_socket_xprt(); svc_cleanup_xprt_sock(); sunrpc_debugfs_exit(); unregister_rpc_pipefs(); rpc_destroy_mempool(); unregister_pernet_subsys(&sunrpc_net_ops); #if IS_ENABLED(CONFIG_SUNRPC_DEBUG) rpc_unregister_sysctl(); #endif rcu_barrier(); /* Wait for completion of call_rcu()'s */ }
static void __exit cleanup_sunrpc(void) { cleanup_rpcb_clnt(); rpcauth_remove_module(); cleanup_socket_xprt(); svc_cleanup_xprt_sock(); unregister_rpc_pipefs(); rpc_destroy_mempool(); cache_unregister(&unix_gid_cache); unregister_pernet_subsys(&sunrpc_net_ops); #ifdef RPC_DEBUG rpc_unregister_sysctl(); #endif rcu_barrier(); /* Wait for completion of call_rcu()'s */ }
static void __exit cleanup_sunrpc(void) { rpcauth_remove_module(); cleanup_socket_xprt(); unregister_rpc_pipefs(); rpc_destroy_mempool(); if (cache_unregister(&ip_map_cache)) printk(KERN_ERR "sunrpc: failed to unregister ip_map cache\n"); if (cache_unregister(&unix_gid_cache)) printk(KERN_ERR "sunrpc: failed to unregister unix_gid cache\n"); #ifdef RPC_DEBUG rpc_unregister_sysctl(); #endif #ifdef CONFIG_PROC_FS rpc_proc_exit(); #endif }
static void __exit cleanup_sunrpc(void) { ve_sunrpc_hook_unregister(); rpcauth_remove_module(); cleanup_socket_xprt(); svc_cleanup_xprt_sock(); unregister_rpc_pipefs(); rpc_destroy_mempool(); cache_unregister(&ip_map_cache); cache_unregister(&unix_gid_cache); #ifdef RPC_DEBUG rpc_unregister_sysctl(); #endif #ifdef CONFIG_PROC_FS rpc_proc_exit(); #endif rcu_barrier(); /* Wait for completion of call_rcu()'s */ }
static int __init init_sunrpc(void) { int err = rpc_init_mempool(); if (err) goto out; err = rpcauth_init_module(); if (err) goto out2; cache_initialize(); err = register_pernet_subsys(&sunrpc_net_ops); if (err) goto out3; err = register_rpc_pipefs(); if (err) goto out4; err = sunrpc_debugfs_init(); if (err) goto out5; #if IS_ENABLED(CONFIG_SUNRPC_DEBUG) rpc_register_sysctl(); #endif svc_init_xprt_sock(); /* svc sock transport */ init_socket_xprt(); /* clnt sock transport */ return 0; out5: unregister_rpc_pipefs(); out4: unregister_pernet_subsys(&sunrpc_net_ops); out3: rpcauth_remove_module(); out2: rpc_destroy_mempool(); out: return err; }