Esempio n. 1
0
static __net_exit void sunrpc_exit_net(struct net *net)
{
	rpc_pipefs_exit_net(net);
	unix_gid_cache_destroy(net);
	ip_map_cache_destroy(net);
	rpc_proc_exit(net);
}
Esempio n. 2
0
static __net_init int sunrpc_init_net(struct net *net)
{
	int err;
	struct sunrpc_net *sn = net_generic(net, sunrpc_net_id);

	err = rpc_proc_init(net);
	if (err)
		goto err_proc;

	err = ip_map_cache_create(net);
	if (err)
		goto err_ipmap;

	err = unix_gid_cache_create(net);
	if (err)
		goto err_unixgid;

	err = rpc_pipefs_init_net(net);
	if (err)
		goto err_pipefs;

	INIT_LIST_HEAD(&sn->all_clients);
	spin_lock_init(&sn->rpc_client_lock);
	spin_lock_init(&sn->rpcb_clnt_lock);
	return 0;

err_pipefs:
	unix_gid_cache_destroy(net);
err_unixgid:
	ip_map_cache_destroy(net);
err_ipmap:
	rpc_proc_exit(net);
err_proc:
	return err;
}
Esempio n. 3
0
static void __exit
cleanup_sunrpc(void)
{
#ifdef RPC_DEBUG
	rpc_unregister_sysctl();
#endif
	rpc_proc_exit();
}
Esempio n. 4
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
}
Esempio n. 5
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
}
Esempio n. 6
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 */
}
Esempio n. 7
0
static __net_init int sunrpc_init_net(struct net *net)
{
	int err;

	err = rpc_proc_init(net);
	if (err)
		goto err_proc;

	err = ip_map_cache_create(net);
	if (err)
		goto err_ipmap;

	return 0;

err_ipmap:
	rpc_proc_exit(net);
err_proc:
	return err;
}
Esempio n. 8
0
static __net_exit void sunrpc_exit_net(struct net *net)
{
	ip_map_cache_destroy(net);
	rpc_proc_exit(net);
}