Commit 06a9701f4b3e3381dea96fee1cc8a3bb41b0a1f1
Committed by
David S. Miller
1 parent
da2033c282
Exists in
master
and in
39 other branches
__in_dev_get_rtnl() can use rtnl_dereference()
If caller holds RTNL, we dont need a memory barrier (smp_read_barrier_depends) included in rcu_dereference(). Just use rtnl_dereference() to properly document the assertions. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
include/linux/inetdevice.h
... | ... | @@ -222,7 +222,7 @@ |
222 | 222 | |
223 | 223 | static inline struct in_device *__in_dev_get_rtnl(const struct net_device *dev) |
224 | 224 | { |
225 | - return rcu_dereference_check(dev->ip_ptr, lockdep_rtnl_is_held()); | |
225 | + return rtnl_dereference(dev->ip_ptr); | |
226 | 226 | } |
227 | 227 | |
228 | 228 | extern void in_dev_finish_destroy(struct in_device *idev); |