summaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bond_main.c
diff options
context:
space:
mode:
authorNikolay Aleksandrov2014-09-11 22:49:27 +0200
committerDavid S. Miller2014-09-13 22:29:07 +0200
commite470259fa1bd7ce5a375b16c5ec97cc0e83b058d (patch)
tree54598d31df40f265aed61901b30a64f32b62b16b /drivers/net/bonding/bond_main.c
parentbonding: alb: convert to bond->mode_lock (diff)
downloadkernel-qcow2-linux-e470259fa1bd7ce5a375b16c5ec97cc0e83b058d.tar.gz
kernel-qcow2-linux-e470259fa1bd7ce5a375b16c5ec97cc0e83b058d.tar.xz
kernel-qcow2-linux-e470259fa1bd7ce5a375b16c5ec97cc0e83b058d.zip
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.c8
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,
*/
netdev_rx_handler_unregister(slave_dev);
- if (BOND_MODE(bond) == BOND_MODE_8023AD) {
- /* Sync against bond_3ad_rx_indication and
- * bond_3ad_state_machine_handler
- */
- spin_lock_bh(&bond->mode_lock);
+ if (BOND_MODE(bond) == BOND_MODE_8023AD)
bond_3ad_unbind_slave(slave);
- spin_unlock_bh(&bond->mode_lock);
- }
netdev_info(bond_dev, "Releasing %s interface %s\n",
bond_is_active_slave(slave) ? "active" : "backup",