diff options
author | David S. Miller <davem@davemloft.net> | 2008-07-08 23:13:53 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-08 23:13:53 -0700 |
commit | c773e847ea8f6812804e40f52399c6921a00eab1 (patch) | |
tree | 952e0e262cc0b0f2136bc2a62938ae1d186f896a /drivers/net/bonding/bond_main.c | |
parent | eb6aafe3f843cb0e939546c03540a3b4911b6964 (diff) | |
download | blackbird-op-linux-c773e847ea8f6812804e40f52399c6921a00eab1.tar.gz blackbird-op-linux-c773e847ea8f6812804e40f52399c6921a00eab1.zip |
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/bond_main.c')
-rw-r--r-- | drivers/net/bonding/bond_main.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index d57b65dc2c72..dc733d75a5e9 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); |