aboutsummaryrefslogtreecommitdiffstats
path: root/net/sysctl_net.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2012-01-08 03:02:37 -0500
committerEric W. Biederman <ebiederm@xmission.com>2012-01-24 19:40:30 -0500
commit60a47a2e823cbe6b609346bffff61a00c0c76470 (patch)
treeb19ac63068757893d6f110cf31d27fb59942d005 /net/sysctl_net.c
parent0e47c99d7fe25e0f3907d9f3401079169d904891 (diff)
sysctl: Modify __register_sysctl_paths to take a set instead of a root and an nsproxy
An nsproxy argument here has always been awkard and now the nsproxy argument is completely unnecessary so remove it, replacing it with the set we want the registered tables to show up in. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Diffstat (limited to 'net/sysctl_net.c')
-rw-r--r--net/sysctl_net.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/net/sysctl_net.c b/net/sysctl_net.c
index e998c6448046..c3e65aebecc0 100644
--- a/net/sysctl_net.c
+++ b/net/sysctl_net.c
@@ -105,19 +105,15 @@ subsys_initcall(net_sysctl_init);
105struct ctl_table_header *register_net_sysctl_table(struct net *net, 105struct ctl_table_header *register_net_sysctl_table(struct net *net,
106 const struct ctl_path *path, struct ctl_table *table) 106 const struct ctl_path *path, struct ctl_table *table)
107{ 107{
108 struct nsproxy namespaces; 108 return __register_sysctl_paths(&net->sysctls, path, table);
109 namespaces = *current->nsproxy;
110 namespaces.net_ns = net;
111 return __register_sysctl_paths(&net_sysctl_root,
112 &namespaces, path, table);
113} 109}
114EXPORT_SYMBOL_GPL(register_net_sysctl_table); 110EXPORT_SYMBOL_GPL(register_net_sysctl_table);
115 111
116struct ctl_table_header *register_net_sysctl_rotable(const 112struct ctl_table_header *register_net_sysctl_rotable(const
117 struct ctl_path *path, struct ctl_table *table) 113 struct ctl_path *path, struct ctl_table *table)
118{ 114{
119 return __register_sysctl_paths(&net_sysctl_ro_root, 115 return __register_sysctl_paths(&net_sysctl_ro_root.default_set,
120 &init_nsproxy, path, table); 116 path, table);
121} 117}
122EXPORT_SYMBOL_GPL(register_net_sysctl_rotable); 118EXPORT_SYMBOL_GPL(register_net_sysctl_rotable);
123 119