Re: [PATCH 7/9] sunrpc: The per-net skeleton

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 15, 2010 at 04:28:25PM +0400, Pavel Emelyanov wrote:
> @@ -38,18 +58,26 @@ init_sunrpc(void)
>  	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
>  #ifdef CONFIG_PROC_FS
>  	rpc_proc_init();
>  #endif
> -	cache_initialize();
>  	cache_register(&ip_map_cache);
>  	cache_register(&unix_gid_cache);
>  	svc_init_xprt_sock();	/* svc sock transport */
>  	init_socket_xprt();	/* clnt sock transport */
>  	return 0;
> +
> +out4:
> +	unregister_pernet_subsys(&sunrpc_net_ops);

If register_pernet_subsys() failed, then shouldn't this be unnecessary?
Maybe this should be rpcauth_remove_module()?

--b.

>  out3:
>  	rpc_destroy_mempool();
>  out2:
> @@ -69,6 +97,7 @@ cleanup_sunrpc(void)
>  	rpc_destroy_mempool();
>  	cache_unregister(&ip_map_cache);
>  	cache_unregister(&unix_gid_cache);
> +	unregister_pernet_subsys(&sunrpc_net_ops);
>  #ifdef RPC_DEBUG
>  	rpc_unregister_sysctl();
>  #endif
> -- 
> 1.5.5.6
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux