]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - net/sysctl_net.c
Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
[mirror_ubuntu-artful-kernel.git] / net / sysctl_net.c
index 07c6b879c8b2d4bc3fa15358fb871aa46c996e69..c3e65aebecc08f85b3d5d471d9ce65908f7ea2d8 100644 (file)
@@ -74,8 +74,7 @@ static struct ctl_table_root net_sysctl_ro_root = {
 
 static int __net_init sysctl_net_init(struct net *net)
 {
-       setup_sysctl_set(&net->sysctls,
-                        is_seen);
+       setup_sysctl_set(&net->sysctls, &net_sysctl_root, is_seen);
        return 0;
 }
 
@@ -95,7 +94,7 @@ static __init int net_sysctl_init(void)
        ret = register_pernet_subsys(&sysctl_pernet_ops);
        if (ret)
                goto out;
-       setup_sysctl_set(&net_sysctl_ro_root.default_set, NULL);
+       setup_sysctl_set(&net_sysctl_ro_root.default_set, &net_sysctl_ro_root, NULL);
        register_sysctl_root(&net_sysctl_ro_root);
        register_sysctl_root(&net_sysctl_root);
 out:
@@ -106,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);