summaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bond_alb.c
diff options
context:
space:
mode:
authorJay Vosburgh <fubar@us.ibm.com>2008-01-18 01:24:58 +0100
committerJeff Garzik <jeff@garzik.org>2008-01-18 20:38:38 +0100
commite0138a66e18c6755ee29ce13b3f1142af775dc5f (patch)
tree85a7443ff69676ed9bfe6f550e0f262172ab0750 /drivers/net/bonding/bond_alb.c
parentbonding: fix locking in sysfs primary/active selection (diff)
downloadlinux-e0138a66e18c6755ee29ce13b3f1142af775dc5f.tar.xz
linux-e0138a66e18c6755ee29ce13b3f1142af775dc5f.zip
bonding: fix ASSERT_RTNL that produces spurious warnings
Move an ASSERT_RTNL down to where we should hold only RTNL; the existing check produces spurious warnings because we hold additional locks at _bh, tripping a debug warning in spin_lock_mutex(). Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/bonding/bond_alb.c')
-rw-r--r--drivers/net/bonding/bond_alb.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
index 25b8dbf6cfd7..9b55a123c08f 100644
--- a/drivers/net/bonding/bond_alb.c
+++ b/drivers/net/bonding/bond_alb.c
@@ -1601,9 +1601,6 @@ void bond_alb_handle_active_change(struct bonding *bond, struct slave *new_slave
struct slave *swap_slave;
int i;
- if (new_slave)
- ASSERT_RTNL();
-
if (bond->curr_active_slave == new_slave) {
return;
}
@@ -1649,6 +1646,8 @@ void bond_alb_handle_active_change(struct bonding *bond, struct slave *new_slave
write_unlock_bh(&bond->curr_slave_lock);
read_unlock(&bond->lock);
+ ASSERT_RTNL();
+
/* curr_active_slave must be set before calling alb_swap_mac_addr */
if (swap_slave) {
/* swap mac address */