From b743562819bd97cc7c282e870896bae8016b64b5 Mon Sep 17 00:00:00 2001 From: Nikolay Aleksandrov Date: Thu, 11 Sep 2014 22:49:25 +0200 Subject: bonding: convert curr_slave_lock to a spinlock and rename it curr_slave_lock is now a misleading name, a much better name is mode_lock as it'll be used for each mode's purposes and it's no longer necessary to use a rwlock, a simple spinlock is enough. Suggested-by: Jay Vosburgh Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller --- drivers/net/bonding/bond_3ad.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/net/bonding/bond_3ad.c') diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c index dfd3a7835d17..1824d1df4d09 100644 --- a/drivers/net/bonding/bond_3ad.c +++ b/drivers/net/bonding/bond_3ad.c @@ -2057,7 +2057,7 @@ void bond_3ad_state_machine_handler(struct work_struct *work) 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 */ @@ -2120,7 +2120,7 @@ re_arm: } } 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); -- cgit v1.2.3