|
@@ -1706,10 +1706,8 @@ void bond_alb_handle_active_change(struct bonding *bond, struct slave *new_slave
|
|
* Called with RTNL
|
|
* Called with RTNL
|
|
*/
|
|
*/
|
|
int bond_alb_set_mac_address(struct net_device *bond_dev, void *addr)
|
|
int bond_alb_set_mac_address(struct net_device *bond_dev, void *addr)
|
|
- __releases(&bond->curr_slave_lock)
|
|
|
|
- __releases(&bond->lock)
|
|
|
|
__acquires(&bond->lock)
|
|
__acquires(&bond->lock)
|
|
- __acquires(&bond->curr_slave_lock)
|
|
|
|
|
|
+ __releases(&bond->lock)
|
|
{
|
|
{
|
|
struct bonding *bond = netdev_priv(bond_dev);
|
|
struct bonding *bond = netdev_priv(bond_dev);
|
|
struct sockaddr *sa = addr;
|
|
struct sockaddr *sa = addr;
|
|
@@ -1745,9 +1743,6 @@ int bond_alb_set_mac_address(struct net_device *bond_dev, void *addr)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- write_unlock_bh(&bond->curr_slave_lock);
|
|
|
|
- read_unlock(&bond->lock);
|
|
|
|
-
|
|
|
|
if (swap_slave) {
|
|
if (swap_slave) {
|
|
alb_swap_mac_addr(bond, swap_slave, bond->curr_active_slave);
|
|
alb_swap_mac_addr(bond, swap_slave, bond->curr_active_slave);
|
|
alb_fasten_mac_swap(bond, swap_slave, bond->curr_active_slave);
|
|
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)
|
|
alb_set_slave_mac_addr(bond->curr_active_slave, bond_dev->dev_addr,
|
|
alb_set_slave_mac_addr(bond->curr_active_slave, bond_dev->dev_addr,
|
|
bond->alb_info.rlb_enabled);
|
|
bond->alb_info.rlb_enabled);
|
|
|
|
|
|
|
|
+ read_lock(&bond->lock);
|
|
alb_send_learning_packets(bond->curr_active_slave, bond_dev->dev_addr);
|
|
alb_send_learning_packets(bond->curr_active_slave, bond_dev->dev_addr);
|
|
if (bond->alb_info.rlb_enabled) {
|
|
if (bond->alb_info.rlb_enabled) {
|
|
/* inform clients mac address has changed */
|
|
/* inform clients mac address has changed */
|
|
rlb_req_update_slave_clients(bond, bond->curr_active_slave);
|
|
rlb_req_update_slave_clients(bond, bond->curr_active_slave);
|
|
}
|
|
}
|
|
|
|
+ read_unlock(&bond->lock);
|
|
}
|
|
}
|
|
|
|
|
|
- read_lock(&bond->lock);
|
|
|
|
- write_lock_bh(&bond->curr_slave_lock);
|
|
|
|
-
|
|
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|