aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bond_alb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/bonding/bond_alb.c')
-rw-r--r--drivers/net/bonding/bond_alb.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
index 8dc6fbb9a41e..46d312bedfb8 100644
--- a/drivers/net/bonding/bond_alb.c
+++ b/drivers/net/bonding/bond_alb.c
@@ -370,8 +370,6 @@ static int rlb_arp_recv(struct sk_buff *skb, struct net_device *bond_dev, struct
370 370
371 if (arp->op_code == htons(ARPOP_REPLY)) { 371 if (arp->op_code == htons(ARPOP_REPLY)) {
372 /* update rx hash table for this ARP */ 372 /* update rx hash table for this ARP */
373 printk("rar: update orig %s bond_dev %s\n", orig_dev->name,
374 bond_dev->name);
375 bond = netdev_priv(bond_dev); 373 bond = netdev_priv(bond_dev);
376 rlb_update_entry_from_arp(bond, arp); 374 rlb_update_entry_from_arp(bond, arp);
377 pr_debug("Server received an ARP Reply from client\n"); 375 pr_debug("Server received an ARP Reply from client\n");
@@ -1708,10 +1706,8 @@ void bond_alb_handle_active_change(struct bonding *bond, struct slave *new_slave
1708 * Called with RTNL 1706 * Called with RTNL
1709 */ 1707 */
1710int bond_alb_set_mac_address(struct net_device *bond_dev, void *addr) 1708int bond_alb_set_mac_address(struct net_device *bond_dev, void *addr)
1711 __releases(&bond->curr_slave_lock)
1712 __releases(&bond->lock)
1713 __acquires(&bond->lock) 1709 __acquires(&bond->lock)
1714 __acquires(&bond->curr_slave_lock) 1710 __releases(&bond->lock)
1715{ 1711{
1716 struct bonding *bond = netdev_priv(bond_dev); 1712 struct bonding *bond = netdev_priv(bond_dev);
1717 struct sockaddr *sa = addr; 1713 struct sockaddr *sa = addr;
@@ -1747,9 +1743,6 @@ int bond_alb_set_mac_address(struct net_device *bond_dev, void *addr)
1747 } 1743 }
1748 } 1744 }
1749 1745
1750 write_unlock_bh(&bond->curr_slave_lock);
1751 read_unlock(&bond->lock);
1752
1753 if (swap_slave) { 1746 if (swap_slave) {
1754 alb_swap_mac_addr(bond, swap_slave, bond->curr_active_slave); 1747 alb_swap_mac_addr(bond, swap_slave, bond->curr_active_slave);
1755 alb_fasten_mac_swap(bond, swap_slave, bond->curr_active_slave); 1748 alb_fasten_mac_swap(bond, swap_slave, bond->curr_active_slave);
@@ -1757,16 +1750,15 @@ int bond_alb_set_mac_address(struct net_device *bond_dev, void *addr)
1757 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,
1758 bond->alb_info.rlb_enabled); 1751 bond->alb_info.rlb_enabled);
1759 1752
1753 read_lock(&bond->lock);
1760 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);
1761 if (bond->alb_info.rlb_enabled) { 1755 if (bond->alb_info.rlb_enabled) {
1762 /* inform clients mac address has changed */ 1756 /* inform clients mac address has changed */
1763 rlb_req_update_slave_clients(bond, bond->curr_active_slave); 1757 rlb_req_update_slave_clients(bond, bond->curr_active_slave);
1764 } 1758 }
1759 read_unlock(&bond->lock);
1765 } 1760 }
1766 1761
1767 read_lock(&bond->lock);
1768 write_lock_bh(&bond->curr_slave_lock);
1769
1770 return 0; 1762 return 0;
1771} 1763}
1772 1764