From: stephen hemminger Date: Tue, 10 Nov 2009 07:54:56 +0000 (+0000) Subject: CAN: use dev_get_by_index_rcu X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ff879eb611dba859c4349048a32789e8c82afa91;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git CAN: use dev_get_by_index_rcu Use new function to avoid doing read_lock(). Signed-off-by: Stephen Hemminger Acked-by: Eric Dumazet Signed-off-by: Oliver Hartkopp Signed-off-by: David S. Miller --- diff --git a/net/can/bcm.c b/net/can/bcm.c index c302c2ec959..e32af52238a 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; }