]> git.karo-electronics.de Git - linux-beck.git/commitdiff
__in_dev_get_rtnl() can use rtnl_dereference()
authorEric Dumazet <eric.dumazet@gmail.com>
Wed, 1 Dec 2010 01:37:42 +0000 (01:37 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 6 Dec 2010 20:59:05 +0000 (12:59 -0800)
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>
include/linux/inetdevice.h

index 2b86eaf11773fd80cb58d4b4e19b2640ae833dae..ae8fdc54e0c06941356de75606fc186f7cc63507 100644 (file)
@@ -222,7 +222,7 @@ static inline struct in_device *in_dev_get(const struct net_device *dev)
 
 static inline struct in_device *__in_dev_get_rtnl(const struct net_device *dev)
 {
-       return rcu_dereference_check(dev->ip_ptr, lockdep_rtnl_is_held());
+       return rtnl_dereference(dev->ip_ptr);
 }
 
 extern void in_dev_finish_destroy(struct in_device *idev);