aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/bonding
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-07-08 23:13:53 -0700
committerDavid S. Miller <davem@davemloft.net>2008-07-08 23:13:53 -0700
commitc773e847ea8f6812804e40f52399c6921a00eab1 (patch)
tree952e0e262cc0b0f2136bc2a62938ae1d186f896a /drivers/net/bonding
parenteb6aafe3f843cb0e939546c03540a3b4911b6964 (diff)
netdev: Move _xmit_lock and xmit_lock_owner into netdev_queue.
Accesses are mostly structured such that when there are multiple TX queues the code transformations will be a little bit simpler. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding')
-rw-r--r--drivers/net/bonding/bond_main.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index d57b65dc2c7..dc733d75a5e 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -5019,6 +5019,17 @@ static int bond_check_params(struct bond_params *params)
static struct lock_class_key bonding_netdev_xmit_lock_key;
+static void bond_set_lockdep_class_one(struct netdev_queue *txq)
+{
+ lockdep_set_class(&txq->_xmit_lock,
+ &bonding_netdev_xmit_lock_key);
+}
+
+static void bond_set_lockdep_class(struct net_device *dev)
+{
+ bond_set_lockdep_class_one(&dev->tx_queue);
+}
+
/* Create a new bond based on the specified name and bonding parameters.
* If name is NULL, obtain a suitable "bond%d" name for us.
* Caller must NOT hold rtnl_lock; we need to release it here before we
@@ -5076,7 +5087,7 @@ int bond_create(char *name, struct bond_params *params)
goto out_bond;
}
- lockdep_set_class(&bond_dev->_xmit_lock, &bonding_netdev_xmit_lock_key);
+ bond_set_lockdep_class(bond_dev);
netif_carrier_off(bond_dev);