summaryrefslogtreecommitdiffstats
path: root/include/linux/inetdevice.h
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2010-12-01 01:37:42 +0000
committerDavid S. Miller <davem@davemloft.net>2010-12-06 12:59:05 -0800
commit06a9701f4b3e3381dea96fee1cc8a3bb41b0a1f1 (patch)
treea6cb5d4635b16e9ff450b5e3533b2b27f8de48aa /include/linux/inetdevice.h
parentda2033c282264bfba4e339b7cb3df62adb5c5fc8 (diff)
downloadop-kernel-dev-06a9701f4b3e3381dea96fee1cc8a3bb41b0a1f1.zip
op-kernel-dev-06a9701f4b3e3381dea96fee1cc8a3bb41b0a1f1.tar.gz
__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>
Diffstat (limited to 'include/linux/inetdevice.h')
-rw-r--r--include/linux/inetdevice.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h
index 2b86eaf..ae8fdc5 100644
--- a/include/linux/inetdevice.h
+++ b/include/linux/inetdevice.h
@@ -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);
OpenPOWER on IntegriCloud