Patchwork [net-next,3/6] bonding: replace read_lock to rcu_read_lock for bond_3ad_get_active_agg_info()

login
register
mail settings
Submitter dingtianhong
Date Aug. 30, 2013, 10:04 a.m.
Message ID <52206E43.3000704@huawei.com>
Download mbox | patch
Permalink /patch/271210/
State Changes Requested
Delegated to: David Miller
Headers show

Comments

dingtianhong - Aug. 30, 2013, 10:04 a.m.
the bond slave list will protected by rcu, so the read lock should replace by
rcu read lock.

Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Cc: Nikolay Aleksandrov <nikolay@redhat.com>
---
 drivers/net/bonding/bond_3ad.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
index c134f43..b678502 100644
--- a/drivers/net/bonding/bond_3ad.c
+++ b/drivers/net/bonding/bond_3ad.c
@@ -2408,9 +2408,9 @@  int bond_3ad_get_active_agg_info(struct bonding *bond, struct ad_info *ad_info)
 {
 	int ret;
 
-	read_lock(&bond->lock);
+	rcu_read_lock();
 	ret = __bond_3ad_get_active_agg_info(bond, ad_info);
-	read_unlock(&bond->lock);
+	rcu_read_unlock();
 
 	return ret;
 }