]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/802/garp.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/apm
[karo-tx-linux.git] / net / 802 / garp.c
index 5dbe8967bbd56b0f60b08d926ae3bbf4ce68003f..16102951d36aa39cdda6953f36c78320cb0a965b 100644 (file)
@@ -544,11 +544,6 @@ static int garp_init_port(struct net_device *dev)
        return 0;
 }
 
-static void garp_kfree_rcu(struct rcu_head *head)
-{
-       kfree(container_of(head, struct garp_port, rcu));
-}
-
 static void garp_release_port(struct net_device *dev)
 {
        struct garp_port *port = rtnl_dereference(dev->garp_port);
@@ -559,7 +554,7 @@ static void garp_release_port(struct net_device *dev)
                        return;
        }
        rcu_assign_pointer(dev->garp_port, NULL);
-       call_rcu(&port->rcu, garp_kfree_rcu);
+       kfree_rcu(port, rcu);
 }
 
 int garp_init_applicant(struct net_device *dev, struct garp_application *appl)
@@ -611,7 +606,6 @@ void garp_uninit_applicant(struct net_device *dev, struct garp_application *appl
        ASSERT_RTNL();
 
        rcu_assign_pointer(port->applicants[appl->type], NULL);
-       synchronize_rcu();
 
        /* Delete timer and generate a final TRANSMIT_PDU event to flush out
         * all pending messages before the applicant is gone. */
@@ -621,7 +615,7 @@ void garp_uninit_applicant(struct net_device *dev, struct garp_application *appl
        garp_queue_xmit(app);
 
        dev_mc_del(dev, appl->proto.group_address);
-       kfree(app);
+       kfree_rcu(app, rcu);
        garp_release_port(dev);
 }
 EXPORT_SYMBOL_GPL(garp_uninit_applicant);