aboutsummaryrefslogtreecommitdiffstats
path: root/net/can
diff options
context:
space:
mode:
authorstephen hemminger <shemminger@vyatta.com>2009-11-10 02:54:56 -0500
committerDavid S. Miller <davem@davemloft.net>2009-11-11 01:27:13 -0500
commitff879eb611dba859c4349048a32789e8c82afa91 (patch)
tree2747cacc2b0882c7b85f92864ac69f1f01df6460 /net/can
parent61fbab77a843d2e772322ac130715cc9a98bf718 (diff)
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>
Diffstat (limited to 'net/can')
-rw-r--r--net/can/bcm.c6
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)
139 if (!ifindex) 139 if (!ifindex)
140 return "any"; 140 return "any";
141 141
142 read_lock(&dev_base_lock); 142 rcu_read_lock();
143 dev = __dev_get_by_index(&init_net, ifindex); 143 dev = dev_get_by_index_rcu(&init_net, ifindex);
144 if (dev) 144 if (dev)
145 strcpy(result, dev->name); 145 strcpy(result, dev->name);
146 else 146 else
147 strcpy(result, "???"); 147 strcpy(result, "???");
148 read_unlock(&dev_base_lock); 148 rcu_read_unlock();
149 149
150 return result; 150 return result;
151} 151}