summaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bond_alb.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2012-06-13 07:30:07 +0200
committerDavid S. Miller <davem@davemloft.net>2012-06-14 01:00:26 +0200
commit0450243096de90ff51c3a6c605410c5e28d79f8d (patch)
tree8772dad022f5f6ae922a68b5b398dec561d1a1c0 /drivers/net/bonding/bond_alb.c
parentdcbnl: Use type safe nlmsg_data() (diff)
downloadlinux-0450243096de90ff51c3a6c605410c5e28d79f8d.tar.xz
linux-0450243096de90ff51c3a6c605410c5e28d79f8d.zip
bonding: drop_monitor aware
When packets are dropped in TX path, its better to use kfree_skb() instead of dev_kfree_skb() to give proper drop_monitor events. Also move the kfree_skb() call after read_unlock() in bond_alb_xmit() and bond_xmit_activebackup() Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding/bond_alb.c')
-rw-r--r--drivers/net/bonding/bond_alb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
index ef3791a09ad8..e15cc11edbbe 100644
--- a/drivers/net/bonding/bond_alb.c
+++ b/drivers/net/bonding/bond_alb.c
@@ -1346,12 +1346,12 @@ int bond_alb_xmit(struct sk_buff *skb, struct net_device *bond_dev)
}
}
+ read_unlock(&bond->curr_slave_lock);
+
if (res) {
/* no suitable interface, frame not sent */
- dev_kfree_skb(skb);
+ kfree_skb(skb);
}
- read_unlock(&bond->curr_slave_lock);
-
return NETDEV_TX_OK;
}