struct port *port;
bool should_notify_rtnl = BOND_SLAVE_NOTIFY_LATER;
- read_lock(&bond->curr_slave_lock);
+ spin_lock_bh(&bond->mode_lock);
rcu_read_lock();
/* check if there are any slaves */
}
}
rcu_read_unlock();
- read_unlock(&bond->curr_slave_lock);
+ spin_unlock_bh(&bond->mode_lock);
if (should_notify_rtnl && rtnl_trylock()) {
bond_slave_state_notify(bond);
/* Sync against bond_3ad_rx_indication and
* bond_3ad_state_machine_handler
*/
- write_lock_bh(&bond->curr_slave_lock);
+ spin_lock_bh(&bond->mode_lock);
bond_3ad_unbind_slave(slave);
- write_unlock_bh(&bond->curr_slave_lock);
+ spin_unlock_bh(&bond->mode_lock);
}
netdev_info(bond_dev, "Releasing %s interface %s\n",
{
struct bonding *bond = netdev_priv(bond_dev);
- /* initialize rwlocks */
- rwlock_init(&bond->curr_slave_lock);
+ spin_lock_init(&bond->mode_lock);
bond->params = bonding_defaults;
/* Initialize pointers */
s32 slave_cnt; /* never change this value outside the attach/detach wrappers */
int (*recv_probe)(const struct sk_buff *, struct bonding *,
struct slave *);
- rwlock_t curr_slave_lock;
+ spinlock_t mode_lock;
u8 send_peer_notif;
u8 igmp_retrans;
#ifdef CONFIG_PROC_FS