summaryrefslogtreecommitdiffstats
path: root/net/sysctl_net.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2012-01-08 00:02:37 -0800
committerEric W. Biederman <ebiederm@xmission.com>2012-01-24 16:40:30 -0800
commit60a47a2e823cbe6b609346bffff61a00c0c76470 (patch)
treeb19ac63068757893d6f110cf31d27fb59942d005 /net/sysctl_net.c
parent0e47c99d7fe25e0f3907d9f3401079169d904891 (diff)
downloadlinux-60a47a2e823cbe6b609346bffff61a00c0c76470.tar.gz
linux-60a47a2e823cbe6b609346bffff61a00c0c76470.tar.bz2
linux-60a47a2e823cbe6b609346bffff61a00c0c76470.zip
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);
struct ctl_table_header *register_net_sysctl_table(struct net *net,
const struct ctl_path *path, struct ctl_table *table)
{
- struct nsproxy namespaces;
- namespaces = *current->nsproxy;
- namespaces.net_ns = net;
- return __register_sysctl_paths(&net_sysctl_root,
- &namespaces, path, table);
+ return __register_sysctl_paths(&net->sysctls, path, table);
}
EXPORT_SYMBOL_GPL(register_net_sysctl_table);
struct ctl_table_header *register_net_sysctl_rotable(const
struct ctl_path *path, struct ctl_table *table)
{
- return __register_sysctl_paths(&net_sysctl_ro_root,
- &init_nsproxy, path, table);
+ return __register_sysctl_paths(&net_sysctl_ro_root.default_set,
+ path, table);
}
EXPORT_SYMBOL_GPL(register_net_sysctl_rotable);