X-Git-Url: https://bbs.cooldavid.org/git/?a=blobdiff_plain;f=include%2Flinux%2Finetdevice.h;h=2b86eaf11773fd80cb58d4b4e19b2640ae833dae;hb=ca7479ebbd9f7621646bf2792cb7143647f035bb;hp=ccd5b07d678deb8a61ff759ba943dceae6bf1507;hpb=4b37ba90f49d4157ac5628f8d730d3505f176724;p=net-next-2.6.git diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h index ccd5b07d678..2b86eaf1177 100644 --- a/include/linux/inetdevice.h +++ b/include/linux/inetdevice.h @@ -41,10 +41,12 @@ enum __IPV4_DEVCONF_MAX }; +#define IPV4_DEVCONF_MAX (__IPV4_DEVCONF_MAX - 1) + struct ipv4_devconf { void *sysctl; - int data[__IPV4_DEVCONF_MAX - 1]; - DECLARE_BITMAP(state, __IPV4_DEVCONF_MAX - 1); + int data[IPV4_DEVCONF_MAX]; + DECLARE_BITMAP(state, IPV4_DEVCONF_MAX); }; struct in_device { @@ -52,9 +54,8 @@ struct in_device { atomic_t refcnt; int dead; struct in_ifaddr *ifa_list; /* IP ifaddr chain */ - rwlock_t mc_list_lock; - struct ip_mc_list *mc_list; /* IP multicast filter chain */ - int mc_count; /* Number of installed mcasts */ + struct ip_mc_list __rcu *mc_list; /* IP multicast filter chain */ + int mc_count; /* Number of installed mcasts */ spinlock_t mc_tomb_lock; struct ip_mc_list *mc_tomb; unsigned long mr_v1_seen; @@ -91,7 +92,7 @@ static inline void ipv4_devconf_set(struct in_device *in_dev, int index, static inline void ipv4_devconf_setall(struct in_device *in_dev) { - bitmap_fill(in_dev->cnf.state, __IPV4_DEVCONF_MAX - 1); + bitmap_fill(in_dev->cnf.state, IPV4_DEVCONF_MAX); } #define IN_DEV_CONF_GET(in_dev, attr) \