aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-05-19 21:14:34 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-05-19 21:14:34 -0400
commiteb04f2f04ed1227c266b3219c0aaeda525639718 (patch)
tree7f224483a3cd0e439cd64a8666ec9dc5ed178a3d /drivers
parent5765040ebfc9a28d9dcfaaaaf3d25840d922de96 (diff)
parent80d02085d99039b3b7f3a73c8896226b0cb1ba07 (diff)
Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (78 commits) Revert "rcu: Decrease memory-barrier usage based on semi-formal proof" net,rcu: convert call_rcu(prl_entry_destroy_rcu) to kfree batman,rcu: convert call_rcu(softif_neigh_free_rcu) to kfree_rcu batman,rcu: convert call_rcu(neigh_node_free_rcu) to kfree() batman,rcu: convert call_rcu(gw_node_free_rcu) to kfree_rcu net,rcu: convert call_rcu(kfree_tid_tx) to kfree_rcu() net,rcu: convert call_rcu(xt_osf_finger_free_rcu) to kfree_rcu() net/mac80211,rcu: convert call_rcu(work_free_rcu) to kfree_rcu() net,rcu: convert call_rcu(wq_free_rcu) to kfree_rcu() net,rcu: convert call_rcu(phonet_device_rcu_free) to kfree_rcu() perf,rcu: convert call_rcu(swevent_hlist_release_rcu) to kfree_rcu() perf,rcu: convert call_rcu(free_ctx) to kfree_rcu() net,rcu: convert call_rcu(__nf_ct_ext_free_rcu) to kfree_rcu() net,rcu: convert call_rcu(net_generic_release) to kfree_rcu() net,rcu: convert call_rcu(netlbl_unlhsh_free_addr6) to kfree_rcu() net,rcu: convert call_rcu(netlbl_unlhsh_free_addr4) to kfree_rcu() security,rcu: convert call_rcu(sel_netif_free) to kfree_rcu() net,rcu: convert call_rcu(xps_dev_maps_release) to kfree_rcu() net,rcu: convert call_rcu(xps_map_release) to kfree_rcu() net,rcu: convert call_rcu(rps_map_release) to kfree_rcu() ...
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c7
-rw-r--r--drivers/net/macvlan.c10
2 files changed, 2 insertions, 15 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 6f8adc7f5d7c..e145f2c455cb 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -5100,11 +5100,6 @@ err_set_interrupt:
5100 return err; 5100 return err;
5101} 5101}
5102 5102
5103static void ring_free_rcu(struct rcu_head *head)
5104{
5105 kfree(container_of(head, struct ixgbe_ring, rcu));
5106}
5107
5108/** 5103/**
5109 * ixgbe_clear_interrupt_scheme - Clear the current interrupt scheme settings 5104 * ixgbe_clear_interrupt_scheme - Clear the current interrupt scheme settings
5110 * @adapter: board private structure to clear interrupt scheme on 5105 * @adapter: board private structure to clear interrupt scheme on
@@ -5126,7 +5121,7 @@ void ixgbe_clear_interrupt_scheme(struct ixgbe_adapter *adapter)
5126 /* ixgbe_get_stats64() might access this ring, we must wait 5121 /* ixgbe_get_stats64() might access this ring, we must wait
5127 * a grace period before freeing it. 5122 * a grace period before freeing it.
5128 */ 5123 */
5129 call_rcu(&ring->rcu, ring_free_rcu); 5124 kfree_rcu(ring, rcu);
5130 adapter->rx_ring[i] = NULL; 5125 adapter->rx_ring[i] = NULL;
5131 } 5126 }
5132 5127
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index 78e34e9e4f00..d8e4e69ad0b9 100644
--- a/drivers/net/macvlan.c
+++ b/drivers/net/macvlan.c
@@ -603,21 +603,13 @@ static int macvlan_port_create(struct net_device *dev)
603 return err; 603 return err;
604} 604}
605 605
606static void macvlan_port_rcu_free(struct rcu_head *head)
607{
608 struct macvlan_port *port;
609
610 port = container_of(head, struct macvlan_port, rcu);
611 kfree(port);
612}
613
614static void macvlan_port_destroy(struct net_device *dev) 606static void macvlan_port_destroy(struct net_device *dev)
615{ 607{
616 struct macvlan_port *port = macvlan_port_get(dev); 608 struct macvlan_port *port = macvlan_port_get(dev);
617 609
618 dev->priv_flags &= ~IFF_MACVLAN_PORT; 610 dev->priv_flags &= ~IFF_MACVLAN_PORT;
619 netdev_rx_handler_unregister(dev); 611 netdev_rx_handler_unregister(dev);
620 call_rcu(&port->rcu, macvlan_port_rcu_free); 612 kfree_rcu(port, rcu);
621} 613}
622 614
623static int macvlan_validate(struct nlattr *tb[], struct nlattr *data[]) 615static int macvlan_validate(struct nlattr *tb[], struct nlattr *data[])