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.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
index f2e2872c9b17..6db5d763f6b6 100644
--- a/drivers/net/bonding/bond_alb.c
+++ b/drivers/net/bonding/bond_alb.c
@@ -128,12 +128,12 @@ static inline u8 _simple_hash(const u8 *hash_start, int hash_size)
128 128
129static inline void _lock_tx_hashtbl(struct bonding *bond) 129static inline void _lock_tx_hashtbl(struct bonding *bond)
130{ 130{
131 spin_lock(&(BOND_ALB_INFO(bond).tx_hashtbl_lock)); 131 spin_lock_bh(&(BOND_ALB_INFO(bond).tx_hashtbl_lock));
132} 132}
133 133
134static inline void _unlock_tx_hashtbl(struct bonding *bond) 134static inline void _unlock_tx_hashtbl(struct bonding *bond)
135{ 135{
136 spin_unlock(&(BOND_ALB_INFO(bond).tx_hashtbl_lock)); 136 spin_unlock_bh(&(BOND_ALB_INFO(bond).tx_hashtbl_lock));
137} 137}
138 138
139/* Caller must hold tx_hashtbl lock */ 139/* Caller must hold tx_hashtbl lock */
@@ -305,12 +305,12 @@ static struct slave *tlb_choose_channel(struct bonding *bond, u32 hash_index, u3
305/*********************** rlb specific functions ***************************/ 305/*********************** rlb specific functions ***************************/
306static inline void _lock_rx_hashtbl(struct bonding *bond) 306static inline void _lock_rx_hashtbl(struct bonding *bond)
307{ 307{
308 spin_lock(&(BOND_ALB_INFO(bond).rx_hashtbl_lock)); 308 spin_lock_bh(&(BOND_ALB_INFO(bond).rx_hashtbl_lock));
309} 309}
310 310
311static inline void _unlock_rx_hashtbl(struct bonding *bond) 311static inline void _unlock_rx_hashtbl(struct bonding *bond)
312{ 312{
313 spin_unlock(&(BOND_ALB_INFO(bond).rx_hashtbl_lock)); 313 spin_unlock_bh(&(BOND_ALB_INFO(bond).rx_hashtbl_lock));
314} 314}
315 315
316/* when an ARP REPLY is received from a client update its info 316/* when an ARP REPLY is received from a client update its info
@@ -472,13 +472,13 @@ static void rlb_clear_slave(struct bonding *bond, struct slave *slave)
472 472
473 _unlock_rx_hashtbl(bond); 473 _unlock_rx_hashtbl(bond);
474 474
475 write_lock(&bond->curr_slave_lock); 475 write_lock_bh(&bond->curr_slave_lock);
476 476
477 if (slave != bond->curr_active_slave) { 477 if (slave != bond->curr_active_slave) {
478 rlb_teach_disabled_mac_on_primary(bond, slave->dev->dev_addr); 478 rlb_teach_disabled_mac_on_primary(bond, slave->dev->dev_addr);
479 } 479 }
480 480
481 write_unlock(&bond->curr_slave_lock); 481 write_unlock_bh(&bond->curr_slave_lock);
482} 482}
483 483
484static void rlb_update_client(struct rlb_client_info *client_info) 484static void rlb_update_client(struct rlb_client_info *client_info)
@@ -1519,11 +1519,11 @@ int bond_alb_init_slave(struct bonding *bond, struct slave *slave)
1519 /* caller must hold the bond lock for write since the mac addresses 1519 /* caller must hold the bond lock for write since the mac addresses
1520 * are compared and may be swapped. 1520 * are compared and may be swapped.
1521 */ 1521 */
1522 write_lock_bh(&bond->lock); 1522 read_lock(&bond->lock);
1523 1523
1524 res = alb_handle_addr_collision_on_attach(bond, slave); 1524 res = alb_handle_addr_collision_on_attach(bond, slave);
1525 1525
1526 write_unlock_bh(&bond->lock); 1526 read_unlock(&bond->lock);
1527 1527
1528 if (res) { 1528 if (res) {
1529 return res; 1529 return res;