diff options
author | stephen hemminger <shemminger@vyatta.com> | 2009-11-10 08:54:56 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-11 07:27:13 +0100 |
commit | ff879eb611dba859c4349048a32789e8c82afa91 (patch) | |
tree | 2747cacc2b0882c7b85f92864ac69f1f01df6460 | |
parent | IPV4: use rcu to walk list of devices in IGMP (diff) | |
download | linux-ff879eb611dba859c4349048a32789e8c82afa91.tar.xz linux-ff879eb611dba859c4349048a32789e8c82afa91.zip |
CAN: use dev_get_by_index_rcu
Use new function to avoid doing read_lock().
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/can/bcm.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/can/bcm.c b/net/can/bcm.c index c302c2ec959c..e32af52238a2 100644 --- a/net/can/bcm.c +++ b/net/can/bcm.c @@ -139,13 +139,13 @@ static char *bcm_proc_getifname(char *result, int ifindex) if (!ifindex) return "any"; - read_lock(&dev_base_lock); - dev = __dev_get_by_index(&init_net, ifindex); + rcu_read_lock(); + dev = dev_get_by_index_rcu(&init_net, ifindex); if (dev) strcpy(result, dev->name); else strcpy(result, "???"); - read_unlock(&dev_base_lock); + rcu_read_unlock(); return result; } |