summaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-07-15 00:15:08 -0700
committerDavid S. Miller <davem@davemloft.net>2008-07-15 00:15:08 -0700
commitb9e40857682ecfc5bcd0356a23ff409883ffb982 (patch)
treed241fd289bed6d16f36f6d26815c1e78e212c89a /drivers/net/bonding
parente308a5d806c852f56590ffdd3834d0df0cbed8d7 (diff)
downloadop-kernel-dev-b9e40857682ecfc5bcd0356a23ff409883ffb982.zip
op-kernel-dev-b9e40857682ecfc5bcd0356a23ff409883ffb982.tar.gz
netdev: Do not use TX lock to protect address lists.
Now that we have a specific lock to protect the network device unicast and multicast lists, remove extraneous grabs of the TX lock in cases where the code only needs address list protection. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding')
-rw-r--r--drivers/net/bonding/bond_main.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index ea71abd..fd87dbe 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1567,14 +1567,12 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
goto err_close;
}
- netif_tx_lock_bh(bond_dev);
- netif_addr_lock(bond_dev);
+ netif_addr_lock_bh(bond_dev);
/* upload master's mc_list to new slave */
for (dmi = bond_dev->mc_list; dmi; dmi = dmi->next) {
dev_mc_add (slave_dev, dmi->dmi_addr, dmi->dmi_addrlen, 0);
}
- netif_addr_unlock(bond_dev);
- netif_tx_unlock_bh(bond_dev);
+ netif_addr_unlock_bh(bond_dev);
}
if (bond->params.mode == BOND_MODE_8023AD) {
@@ -1938,11 +1936,9 @@ int bond_release(struct net_device *bond_dev, struct net_device *slave_dev)
}
/* flush master's mc_list from slave */
- netif_tx_lock_bh(bond_dev);
- netif_addr_lock(bond_dev);
+ netif_addr_lock_bh(bond_dev);
bond_mc_list_flush(bond_dev, slave_dev);
- netif_addr_unlock(bond_dev);
- netif_tx_unlock_bh(bond_dev);
+ netif_addr_unlock_bh(bond_dev);
}
netdev_set_master(slave_dev, NULL);
@@ -2063,11 +2059,9 @@ static int bond_release_all(struct net_device *bond_dev)
}
/* flush master's mc_list from slave */
- netif_tx_lock_bh(bond_dev);
- netif_addr_lock(bond_dev);
+ netif_addr_lock_bh(bond_dev);
bond_mc_list_flush(bond_dev, slave_dev);
- netif_addr_unlock(bond_dev);
- netif_tx_unlock_bh(bond_dev);
+ netif_addr_unlock_bh(bond_dev);
}
netdev_set_master(slave_dev, NULL);
@@ -4679,11 +4673,9 @@ static void bond_free_all(void)
struct net_device *bond_dev = bond->dev;
bond_work_cancel_all(bond);
- netif_tx_lock_bh(bond_dev);
- netif_addr_lock(bond_dev);
+ netif_addr_lock_bh(bond_dev);
bond_mc_list_destroy(bond);
- netif_addr_unlock(bond_dev);
- netif_tx_unlock_bh(bond_dev);
+ netif_addr_unlock_bh(bond_dev);
/* Release the bonded slaves */
bond_release_all(bond_dev);
bond_destroy(bond);
OpenPOWER on IntegriCloud