]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blobdiff - net/decnet/af_decnet.c
[NET]: Make /proc/net per network namespace
[mirror_ubuntu-hirsute-kernel.git] / net / decnet / af_decnet.c
index bfa910b6ad25935af657beea80cadab38e843ee8..625d5955b8e284a17b84a67b887fe73127fde13f 100644 (file)
@@ -128,6 +128,7 @@ Version 0.0.6    2.1.110   07-aug-98   Eduardo Marcelo Serrat
 #include <linux/stat.h>
 #include <linux/init.h>
 #include <linux/poll.h>
+#include <net/net_namespace.h>
 #include <net/neighbour.h>
 #include <net/dst.h>
 #include <net/fib_rules.h>
@@ -2304,7 +2305,7 @@ static int dn_socket_seq_show(struct seq_file *seq, void *v)
        return 0;
 }
 
-static struct seq_operations dn_socket_seq_ops = {
+static const struct seq_operations dn_socket_seq_ops = {
        .start  = dn_socket_seq_start,
        .next   = dn_socket_seq_next,
        .stop   = dn_socket_seq_stop,
@@ -2399,7 +2400,7 @@ static int __init decnet_init(void)
        dev_add_pack(&dn_dix_packet_type);
        register_netdevice_notifier(&dn_dev_notifier);
 
-       proc_net_fops_create("decnet", S_IRUGO, &dn_socket_seq_fops);
+       proc_net_fops_create(&init_net, "decnet", S_IRUGO, &dn_socket_seq_fops);
        dn_register_sysctl();
 out:
        return rc;
@@ -2428,7 +2429,7 @@ static void __exit decnet_exit(void)
        dn_neigh_cleanup();
        dn_fib_cleanup();
 
-       proc_net_remove("decnet");
+       proc_net_remove(&init_net, "decnet");
 
        proto_unregister(&dn_proto);
 }