diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-10-28 21:15:29 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-11-08 16:50:07 -0500 |
commit | 840a185dddfd098b78b96a30da4cad722a7aef18 (patch) | |
tree | 25ad5551e354762f765c57ee0e0993c129a60582 /drivers/block/aoe | |
parent | 1d5439b9a29b1386d44a617cbaf2f7acde1d697c (diff) |
aoe: remove dev_base_lock use from aoecmd_cfg_pkts()
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/block/aoe')
-rw-r--r-- | drivers/block/aoe/aoecmd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c index 5674bd01d96d..de0435e63b02 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 | |||
297 | struct sk_buff *skb; | 297 | struct sk_buff *skb; |
298 | struct net_device *ifp; | 298 | struct net_device *ifp; |
299 | 299 | ||
300 | read_lock(&dev_base_lock); | 300 | rcu_read_lock(); |
301 | for_each_netdev(&init_net, ifp) { | 301 | for_each_netdev_rcu(&init_net, ifp) { |
302 | dev_hold(ifp); | 302 | dev_hold(ifp); |
303 | if (!is_aoe_netif(ifp)) | 303 | if (!is_aoe_netif(ifp)) |
304 | goto cont; | 304 | goto cont; |
@@ -325,7 +325,7 @@ aoecmd_cfg_pkts(ushort aoemajor, unsigned char aoeminor, struct sk_buff_head *qu | |||
325 | cont: | 325 | cont: |
326 | dev_put(ifp); | 326 | dev_put(ifp); |
327 | } | 327 | } |
328 | read_unlock(&dev_base_lock); | 328 | rcu_read_unlock(); |
329 | } | 329 | } |
330 | 330 | ||
331 | static void | 331 | static void |