diff options
-rw-r--r-- | drivers/net/bonding/bond_alb.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c index 553a89919778..46d312bedfb8 100644 --- a/drivers/net/bonding/bond_alb.c +++ b/drivers/net/bonding/bond_alb.c | |||
@@ -1706,10 +1706,8 @@ void bond_alb_handle_active_change(struct bonding *bond, struct slave *new_slave | |||
1706 | * Called with RTNL | 1706 | * Called with RTNL |
1707 | */ | 1707 | */ |
1708 | int bond_alb_set_mac_address(struct net_device *bond_dev, void *addr) | 1708 | int bond_alb_set_mac_address(struct net_device *bond_dev, void *addr) |
1709 | __releases(&bond->curr_slave_lock) | ||
1710 | __releases(&bond->lock) | ||
1711 | __acquires(&bond->lock) | 1709 | __acquires(&bond->lock) |
1712 | __acquires(&bond->curr_slave_lock) | 1710 | __releases(&bond->lock) |
1713 | { | 1711 | { |
1714 | struct bonding *bond = netdev_priv(bond_dev); | 1712 | struct bonding *bond = netdev_priv(bond_dev); |
1715 | struct sockaddr *sa = addr; | 1713 | struct sockaddr *sa = addr; |
@@ -1745,9 +1743,6 @@ int bond_alb_set_mac_address(struct net_device *bond_dev, void *addr) | |||
1745 | } | 1743 | } |
1746 | } | 1744 | } |
1747 | 1745 | ||
1748 | write_unlock_bh(&bond->curr_slave_lock); | ||
1749 | read_unlock(&bond->lock); | ||
1750 | |||
1751 | if (swap_slave) { | 1746 | if (swap_slave) { |
1752 | alb_swap_mac_addr(bond, swap_slave, bond->curr_active_slave); | 1747 | alb_swap_mac_addr(bond, swap_slave, bond->curr_active_slave); |
1753 | alb_fasten_mac_swap(bond, swap_slave, bond->curr_active_slave); | 1748 | alb_fasten_mac_swap(bond, swap_slave, bond->curr_active_slave); |
@@ -1755,16 +1750,15 @@ int bond_alb_set_mac_address(struct net_device *bond_dev, void *addr) | |||
1755 | alb_set_slave_mac_addr(bond->curr_active_slave, bond_dev->dev_addr, | 1750 | alb_set_slave_mac_addr(bond->curr_active_slave, bond_dev->dev_addr, |
1756 | bond->alb_info.rlb_enabled); | 1751 | bond->alb_info.rlb_enabled); |
1757 | 1752 | ||
1753 | read_lock(&bond->lock); | ||
1758 | alb_send_learning_packets(bond->curr_active_slave, bond_dev->dev_addr); | 1754 | alb_send_learning_packets(bond->curr_active_slave, bond_dev->dev_addr); |
1759 | if (bond->alb_info.rlb_enabled) { | 1755 | if (bond->alb_info.rlb_enabled) { |
1760 | /* inform clients mac address has changed */ | 1756 | /* inform clients mac address has changed */ |
1761 | rlb_req_update_slave_clients(bond, bond->curr_active_slave); | 1757 | rlb_req_update_slave_clients(bond, bond->curr_active_slave); |
1762 | } | 1758 | } |
1759 | read_unlock(&bond->lock); | ||
1763 | } | 1760 | } |
1764 | 1761 | ||
1765 | read_lock(&bond->lock); | ||
1766 | write_lock_bh(&bond->curr_slave_lock); | ||
1767 | |||
1768 | return 0; | 1762 | return 0; |
1769 | } | 1763 | } |
1770 | 1764 | ||