diff options
| author | Len Brown <len.brown@intel.com> | 2005-12-06 17:31:30 -0500 |
|---|---|---|
| committer | Len Brown <len.brown@intel.com> | 2005-12-06 17:31:30 -0500 |
| commit | 3d5271f9883cba7b54762bc4fe027d4172f06db7 (patch) | |
| tree | ab8a881a14478598a0c8bda0d26c62cdccfffd6d /include/linux/inetdevice.h | |
| parent | 378b2556f4e09fa6f87ff0cb5c4395ff28257d02 (diff) | |
| parent | 9115a6c787596e687df03010d97fccc5e0762506 (diff) | |
Pull release into acpica branch
Diffstat (limited to 'include/linux/inetdevice.h')
| -rw-r--r-- | include/linux/inetdevice.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h index 7e1e15f934f3..fd7af86151b1 100644 --- a/include/linux/inetdevice.h +++ b/include/linux/inetdevice.h @@ -142,13 +142,21 @@ static __inline__ int bad_mask(u32 mask, u32 addr) #define endfor_ifa(in_dev) } +static inline struct in_device *__in_dev_get_rcu(const struct net_device *dev) +{ + struct in_device *in_dev = dev->ip_ptr; + if (in_dev) + in_dev = rcu_dereference(in_dev); + return in_dev; +} + static __inline__ struct in_device * in_dev_get(const struct net_device *dev) { struct in_device *in_dev; rcu_read_lock(); - in_dev = dev->ip_ptr; + in_dev = __in_dev_get_rcu(dev); if (in_dev) atomic_inc(&in_dev->refcnt); rcu_read_unlock(); @@ -156,7 +164,7 @@ in_dev_get(const struct net_device *dev) } static __inline__ struct in_device * -__in_dev_get(const struct net_device *dev) +__in_dev_get_rtnl(const struct net_device *dev) { return (struct in_device*)dev->ip_ptr; } |
