Example #1
0
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;
}
Example #2
0
static int __init
init_sunrpc(void)
{
	int err = register_rpc_pipefs();
	if (err)
		goto out;
	err = rpc_init_mempool();
	if (err) {
		unregister_rpc_pipefs();
		goto out;
	}
#ifdef RPC_DEBUG
	rpc_register_sysctl();
#endif
#ifdef CONFIG_PROC_FS
	rpc_proc_init();
#endif
	cache_register(&ip_map_cache);
	cache_register(&unix_gid_cache);
	svc_init_xprt_sock();	/* svc sock transport */
	init_socket_xprt();	/* clnt sock transport */
	rpcauth_init_module();
	ve_sunrpc_hook_register();
out:
	return err;
}
Example #3
0
static void __exit
cleanup_sunrpc(void)
{
	unregister_rpc_pipefs();
	rpc_destroy_mempool();
	if (cache_unregister(&ip_map_cache))
		printk(KERN_ERR "sunrpc: failed to unregister ip_map cache\n");
#ifdef RPC_DEBUG
	rpc_unregister_sysctl();
#endif
#ifdef CONFIG_PROC_FS
	rpc_proc_exit();
#endif
}
Example #4
0
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 */
}
Example #5
0
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 */
}
Example #6
0
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
}
Example #7
0
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 */
}
Example #8
0
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;
}
Example #9
0
static int __init
init_sunrpc(void)
{
	int err = register_rpc_pipefs();
	if (err)
		goto out;
	err = rpc_init_mempool();
	if (err) {
		unregister_rpc_pipefs();
		goto out;
	}
#ifdef RPC_DEBUG
	rpc_register_sysctl();
#endif
#ifdef CONFIG_PROC_FS
	rpc_proc_init();
#endif
	cache_register(&ip_map_cache);
	cache_register(&unix_gid_cache);
	init_socket_xprt();
out:
	return err;
}