diff options
author | David S. Miller <davem@davemloft.net> | 2008-07-09 02:13:53 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-09 02:13:53 -0400 |
commit | c773e847ea8f6812804e40f52399c6921a00eab1 (patch) | |
tree | 952e0e262cc0b0f2136bc2a62938ae1d186f896a /drivers/net/bonding/bond_main.c | |
parent | eb6aafe3f843cb0e939546c03540a3b4911b6964 (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/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) | |||
5019 | 5019 | ||
5020 | static struct lock_class_key bonding_netdev_xmit_lock_key; | 5020 | static struct lock_class_key bonding_netdev_xmit_lock_key; |
5021 | 5021 | ||
5022 | static void bond_set_lockdep_class_one(struct netdev_queue *txq) | ||
5023 | { | ||
5024 | lockdep_set_class(&txq->_xmit_lock, | ||
5025 | &bonding_netdev_xmit_lock_key); | ||
5026 | } | ||
5027 | |||
5028 | static void bond_set_lockdep_class(struct net_device *dev) | ||
5029 | { | ||
5030 | bond_set_lockdep_class_one(&dev->tx_queue); | ||
5031 | } | ||
5032 | |||
5022 | /* Create a new bond based on the specified name and bonding parameters. | 5033 | /* Create a new bond based on the specified name and bonding parameters. |
5023 | * If name is NULL, obtain a suitable "bond%d" name for us. | 5034 | * If name is NULL, obtain a suitable "bond%d" name for us. |
5024 | * Caller must NOT hold rtnl_lock; we need to release it here before we | 5035 | * 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) | |||
5076 | goto out_bond; | 5087 | goto out_bond; |
5077 | } | 5088 | } |
5078 | 5089 | ||
5079 | lockdep_set_class(&bond_dev->_xmit_lock, &bonding_netdev_xmit_lock_key); | 5090 | bond_set_lockdep_class(bond_dev); |
5080 | 5091 | ||
5081 | netif_carrier_off(bond_dev); | 5092 | netif_carrier_off(bond_dev); |
5082 | 5093 | ||