aboutsummaryrefslogtreecommitdiffstats
path: root/net/sysctl_net.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2012-01-06 06:34:20 -0500
committerEric W. Biederman <ebiederm@xmission.com>2012-01-24 19:37:54 -0500
commitde4e83bd6b5e16d491ec068cd22801d5d063b07a (patch)
treed6b38f1284186abe5f20cfe996be9a4853c503b4 /net/sysctl_net.c
parent0ce8974d504913a0f0ae2d97b20a5ac665431a41 (diff)
sysctl: Register the base sysctl table like any other sysctl table.
Simplify the code by treating the base sysctl table like any other sysctl table and register it with register_sysctl_table. To ensure this table is registered early enough to avoid problems call sysctl_init from proc_sys_init. Rename sysctl_net.c:sysctl_init() to net_sysctl_init() to avoid name conflicts now that kernel/sysctl.c:sysctl_init() is no longer static. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Diffstat (limited to 'net/sysctl_net.c')
-rw-r--r--net/sysctl_net.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sysctl_net.c b/net/sysctl_net.c
index e75813904f26..a6bbee2bc710 100644
--- a/net/sysctl_net.c
+++ b/net/sysctl_net.c
@@ -90,7 +90,7 @@ static struct pernet_operations sysctl_pernet_ops = {
90 .exit = sysctl_net_exit, 90 .exit = sysctl_net_exit,
91}; 91};
92 92
93static __init int sysctl_init(void) 93static __init int net_sysctl_init(void)
94{ 94{
95 int ret; 95 int ret;
96 ret = register_pernet_subsys(&sysctl_pernet_ops); 96 ret = register_pernet_subsys(&sysctl_pernet_ops);
@@ -102,7 +102,7 @@ static __init int sysctl_init(void)
102out: 102out:
103 return ret; 103 return ret;
104} 104}
105subsys_initcall(sysctl_init); 105subsys_initcall(net_sysctl_init);
106 106
107struct ctl_table_header *register_net_sysctl_table(struct net *net, 107struct ctl_table_header *register_net_sysctl_table(struct net *net,
108 const struct ctl_path *path, struct ctl_table *table) 108 const struct ctl_path *path, struct ctl_table *table)