]> Pileus Git - ~andy/linux/blobdiff - net/packet/af_packet.c
hlist: drop the node parameter from iterators
[~andy/linux] / net / packet / af_packet.c
index c111bd0e083a5576d86dfc8f9ad91ab320c46efa..1d6793dbfbae23f8c3f28163c0a67718d489d3ed 100644 (file)
@@ -3263,12 +3263,11 @@ static int packet_getsockopt(struct socket *sock, int level, int optname,
 static int packet_notifier(struct notifier_block *this, unsigned long msg, void *data)
 {
        struct sock *sk;
-       struct hlist_node *node;
        struct net_device *dev = data;
        struct net *net = dev_net(dev);
 
        rcu_read_lock();
-       sk_for_each_rcu(sk, node, &net->packet.sklist) {
+       sk_for_each_rcu(sk, &net->packet.sklist) {
                struct packet_sock *po = pkt_sk(sk);
 
                switch (msg) {
@@ -3828,7 +3827,7 @@ static int __net_init packet_net_init(struct net *net)
        mutex_init(&net->packet.sklist_lock);
        INIT_HLIST_HEAD(&net->packet.sklist);
 
-       if (!proc_net_fops_create(net, "packet", 0, &packet_seq_fops))
+       if (!proc_create("packet", 0, net->proc_net, &packet_seq_fops))
                return -ENOMEM;
 
        return 0;
@@ -3836,7 +3835,7 @@ static int __net_init packet_net_init(struct net *net)
 
 static void __net_exit packet_net_exit(struct net *net)
 {
-       proc_net_remove(net, "packet");
+       remove_proc_entry("packet", net->proc_net);
 }
 
 static struct pernet_operations packet_net_ops = {