diff options
author | Nikolay Aleksandrov <nikolay@redhat.com> | 2014-09-11 16:49:27 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-09-13 16:29:07 -0400 |
commit | e470259fa1bd7ce5a375b16c5ec97cc0e83b058d (patch) | |
tree | 54598d31df40f265aed61901b30a64f32b62b16b /drivers/net/bonding/bond_main.c | |
parent | 4bab16d7c97498e91564231b922d49f52efaf7d4 (diff) |
bonding: 3ad: convert to bond->mode_lock
Now that we have bond->mode_lock, we can remove the state_machine_lock
and use it in its place. There're no fast paths requiring the per-port
spinlocks so it should be okay to consolidate them into mode_lock.
Also move it inside the unbinding function as we don't want to expose
mode_lock outside of the specific modes.
Suggested-by: Jay Vosburgh <jay.vosburgh@canonical.com>
Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
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 | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index e06251417a7d..116cf6965bc5 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -1675,14 +1675,8 @@ static int __bond_release_one(struct net_device *bond_dev, | |||
1675 | */ | 1675 | */ |
1676 | netdev_rx_handler_unregister(slave_dev); | 1676 | netdev_rx_handler_unregister(slave_dev); |
1677 | 1677 | ||
1678 | if (BOND_MODE(bond) == BOND_MODE_8023AD) { | 1678 | if (BOND_MODE(bond) == BOND_MODE_8023AD) |
1679 | /* Sync against bond_3ad_rx_indication and | ||
1680 | * bond_3ad_state_machine_handler | ||
1681 | */ | ||
1682 | spin_lock_bh(&bond->mode_lock); | ||
1683 | bond_3ad_unbind_slave(slave); | 1679 | bond_3ad_unbind_slave(slave); |
1684 | spin_unlock_bh(&bond->mode_lock); | ||
1685 | } | ||
1686 | 1680 | ||
1687 | netdev_info(bond_dev, "Releasing %s interface %s\n", | 1681 | netdev_info(bond_dev, "Releasing %s interface %s\n", |
1688 | bond_is_active_slave(slave) ? "active" : "backup", | 1682 | bond_is_active_slave(slave) ? "active" : "backup", |