aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bond_3ad.c
diff options
context:
space:
mode:
authorMichał Mirosław <mirq-linux@rere.qmqm.pl>2011-05-06 21:48:02 -0400
committerDavid S. Miller <davem@davemloft.net>2011-05-09 15:05:59 -0400
commit0693e88e6ccf615d9674548d8b924cdd9a1c976c (patch)
treec77546505f150e1e6c8a9a8390e7dc01a292d13d /drivers/net/bonding/bond_3ad.c
parent48752e1b1802231ef2a076f34d861918b7d571c3 (diff)
net: bonding: factor out rlock(bond->lock) in xmit path
Pull read_lock(&bond->lock) and BOND_IS_OK() to bond_start_xmit() from mode-dependent xmit functions. netif_running() is always true in hard_start_xmit. Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding/bond_3ad.c')
-rw-r--r--drivers/net/bonding/bond_3ad.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
index d4160f87e910..c7537abca4f2 100644
--- a/drivers/net/bonding/bond_3ad.c
+++ b/drivers/net/bonding/bond_3ad.c
@@ -2403,14 +2403,6 @@ int bond_3ad_xmit_xor(struct sk_buff *skb, struct net_device *dev)
2403 struct ad_info ad_info; 2403 struct ad_info ad_info;
2404 int res = 1; 2404 int res = 1;
2405 2405
2406 /* make sure that the slaves list will
2407 * not change during tx
2408 */
2409 read_lock(&bond->lock);
2410
2411 if (!BOND_IS_OK(bond))
2412 goto out;
2413
2414 if (bond_3ad_get_active_agg_info(bond, &ad_info)) { 2406 if (bond_3ad_get_active_agg_info(bond, &ad_info)) {
2415 pr_debug("%s: Error: bond_3ad_get_active_agg_info failed\n", 2407 pr_debug("%s: Error: bond_3ad_get_active_agg_info failed\n",
2416 dev->name); 2408 dev->name);
@@ -2464,7 +2456,7 @@ out:
2464 /* no suitable interface, frame not sent */ 2456 /* no suitable interface, frame not sent */
2465 dev_kfree_skb(skb); 2457 dev_kfree_skb(skb);
2466 } 2458 }
2467 read_unlock(&bond->lock); 2459
2468 return NETDEV_TX_OK; 2460 return NETDEV_TX_OK;
2469} 2461}
2470 2462