]> 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 9fbe87c938022b79c4f77f73d25cc328d051fbfe..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>
@@ -1839,7 +1840,7 @@ static inline int dn_queue_too_long(struct dn_scp *scp, struct sk_buff_head *que
 }
 
 /*
- * The DECnet spec requires the the "routing layer" accepts packets which
+ * The DECnet spec requires that the "routing layer" accepts packets which
  * are at least 230 bytes in size. This excludes any headers which the NSP
  * layer might add, so we always assume that we'll be using the maximal
  * length header on data packets. The variation in length is due to the
@@ -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);
 }