netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] aoe: remove dev_base_lock use from aoecmd_cfg_pkts()
@ 2010-10-29 11:15 Eric Dumazet
  2010-10-29 17:18 ` Ed Cashin
  2010-11-08 21:43 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Eric Dumazet @ 2010-10-29 11:15 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, Ed L. Cashin

dev_base_lock is the legacy way to lock the device list, and is planned
to disappear. (writers hold RTNL, readers hold RCU lock)

Convert aoecmd_cfg_pkts() to RCU locking.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "Ed L. Cashin" <ecashin@coraid.com>
---
 drivers/block/aoe/aoecmd.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c
index 5674bd0..de0435e 100644
--- a/drivers/block/aoe/aoecmd.c
+++ b/drivers/block/aoe/aoecmd.c
@@ -297,8 +297,8 @@ aoecmd_cfg_pkts(ushort aoemajor, unsigned char aoeminor, struct sk_buff_head *qu
 	struct sk_buff *skb;
 	struct net_device *ifp;
 
-	read_lock(&dev_base_lock);
-	for_each_netdev(&init_net, ifp) {
+	rcu_read_lock();
+	for_each_netdev_rcu(&init_net, ifp) {
 		dev_hold(ifp);
 		if (!is_aoe_netif(ifp))
 			goto cont;
@@ -325,7 +325,7 @@ aoecmd_cfg_pkts(ushort aoemajor, unsigned char aoeminor, struct sk_buff_head *qu
 cont:
 		dev_put(ifp);
 	}
-	read_unlock(&dev_base_lock);
+	rcu_read_unlock();
 }
 
 static void



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] aoe: remove dev_base_lock use from aoecmd_cfg_pkts()
  2010-10-29 11:15 [PATCH] aoe: remove dev_base_lock use from aoecmd_cfg_pkts() Eric Dumazet
@ 2010-10-29 17:18 ` Ed Cashin
  2010-11-08 21:43 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Ed Cashin @ 2010-10-29 17:18 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: David Miller, netdev

Eric Dumazet writes :

> dev_base_lock is the legacy way to lock the device list, and is planned
> to disappear. (writers hold RTNL, readers hold RCU lock)
> 
> Convert aoecmd_cfg_pkts() to RCU locking.


Thanks.

-- 
  Ed Cashin
  ecashin@coraid.com


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] aoe: remove dev_base_lock use from aoecmd_cfg_pkts()
  2010-10-29 11:15 [PATCH] aoe: remove dev_base_lock use from aoecmd_cfg_pkts() Eric Dumazet
  2010-10-29 17:18 ` Ed Cashin
@ 2010-11-08 21:43 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2010-11-08 21:43 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev, ecashin

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 29 Oct 2010 13:15:29 +0200

> dev_base_lock is the legacy way to lock the device list, and is planned
> to disappear. (writers hold RTNL, readers hold RCU lock)
> 
> Convert aoecmd_cfg_pkts() to RCU locking.
> 
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>

Applied.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-11-08 21:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-29 11:15 [PATCH] aoe: remove dev_base_lock use from aoecmd_cfg_pkts() Eric Dumazet
2010-10-29 17:18 ` Ed Cashin
2010-11-08 21:43 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).