aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/inetdevice.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/inetdevice.h')
-rw-r--r--include/linux/inetdevice.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h
index ccd5b07d678d..ae8fdc54e0c0 100644
--- a/include/linux/inetdevice.h
+++ b/include/linux/inetdevice.h
@@ -41,10 +41,12 @@ enum
41 __IPV4_DEVCONF_MAX 41 __IPV4_DEVCONF_MAX
42}; 42};
43 43
44#define IPV4_DEVCONF_MAX (__IPV4_DEVCONF_MAX - 1)
45
44struct ipv4_devconf { 46struct ipv4_devconf {
45 void *sysctl; 47 void *sysctl;
46 int data[__IPV4_DEVCONF_MAX - 1]; 48 int data[IPV4_DEVCONF_MAX];
47 DECLARE_BITMAP(state, __IPV4_DEVCONF_MAX - 1); 49 DECLARE_BITMAP(state, IPV4_DEVCONF_MAX);
48}; 50};
49 51
50struct in_device { 52struct in_device {
@@ -52,9 +54,8 @@ struct in_device {
52 atomic_t refcnt; 54 atomic_t refcnt;
53 int dead; 55 int dead;
54 struct in_ifaddr *ifa_list; /* IP ifaddr chain */ 56 struct in_ifaddr *ifa_list; /* IP ifaddr chain */
55 rwlock_t mc_list_lock; 57 struct ip_mc_list __rcu *mc_list; /* IP multicast filter chain */
56 struct ip_mc_list *mc_list; /* IP multicast filter chain */ 58 int mc_count; /* Number of installed mcasts */
57 int mc_count; /* Number of installed mcasts */
58 spinlock_t mc_tomb_lock; 59 spinlock_t mc_tomb_lock;
59 struct ip_mc_list *mc_tomb; 60 struct ip_mc_list *mc_tomb;
60 unsigned long mr_v1_seen; 61 unsigned long mr_v1_seen;
@@ -91,7 +92,7 @@ static inline void ipv4_devconf_set(struct in_device *in_dev, int index,
91 92
92static inline void ipv4_devconf_setall(struct in_device *in_dev) 93static inline void ipv4_devconf_setall(struct in_device *in_dev)
93{ 94{
94 bitmap_fill(in_dev->cnf.state, __IPV4_DEVCONF_MAX - 1); 95 bitmap_fill(in_dev->cnf.state, IPV4_DEVCONF_MAX);
95} 96}
96 97
97#define IN_DEV_CONF_GET(in_dev, attr) \ 98#define IN_DEV_CONF_GET(in_dev, attr) \
@@ -221,7 +222,7 @@ static inline struct in_device *in_dev_get(const struct net_device *dev)
221 222
222static inline struct in_device *__in_dev_get_rtnl(const struct net_device *dev) 223static inline struct in_device *__in_dev_get_rtnl(const struct net_device *dev)
223{ 224{
224 return rcu_dereference_check(dev->ip_ptr, lockdep_rtnl_is_held()); 225 return rtnl_dereference(dev->ip_ptr);
225} 226}
226 227
227extern void in_dev_finish_destroy(struct in_device *idev); 228extern void in_dev_finish_destroy(struct in_device *idev);