aboutsummaryrefslogtreecommitdiff
path: root/net/sunrpc/sunrpc_syms.c
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@parallels.com>2010-09-27 14:01:58 +0400
committerJ. Bruce Fields <bfields@redhat.com>2010-09-27 10:16:12 -0400
commit4f42d0d53ca4737f82937edb0efc83564c124853 (patch)
tree487cbc8e7bc9ed643fbbfb2216230c15ed3b1552 /net/sunrpc/sunrpc_syms.c
parent2f72c9b73730c335381b13e2bd221abe1acea394 (diff)
sunrpc: Make the /proc/net/rpc appear in net namespaces
Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'net/sunrpc/sunrpc_syms.c')
-rw-r--r--net/sunrpc/sunrpc_syms.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/net/sunrpc/sunrpc_syms.c b/net/sunrpc/sunrpc_syms.c
index faa23229bd2..c076af8535d 100644
--- a/net/sunrpc/sunrpc_syms.c
+++ b/net/sunrpc/sunrpc_syms.c
@@ -28,11 +28,21 @@ int sunrpc_net_id;
static __net_init int sunrpc_init_net(struct net *net)
{
+ int err;
+
+ err = rpc_proc_init(net);
+ if (err)
+ goto err_proc;
+
return 0;
+
+err_proc:
+ return err;
}
static __net_exit void sunrpc_exit_net(struct net *net)
{
+ rpc_proc_exit(net);
}
static struct pernet_operations sunrpc_net_ops = {
@@ -67,9 +77,6 @@ init_sunrpc(void)
#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 */
@@ -101,9 +108,6 @@ cleanup_sunrpc(void)
#ifdef RPC_DEBUG
rpc_unregister_sysctl();
#endif
-#ifdef CONFIG_PROC_FS
- rpc_proc_exit();
-#endif
rcu_barrier(); /* Wait for completion of call_rcu()'s */
}
MODULE_LICENSE("GPL");