]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - include/linux/inetdevice.h
Merge tag 'v2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[mv-sheeva.git] / include / linux / inetdevice.h
index ccd5b07d678deb8a61ff759ba943dceae6bf1507..ae8fdc54e0c06941356de75606fc186f7cc63507 100644 (file)
@@ -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) \
@@ -221,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);