aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/inetdevice.h
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2010-11-12 00:46:50 -0500
committerDavid S. Miller <davem@davemloft.net>2010-11-12 16:18:57 -0500
commit1d7138de878d1d4210727c1200193e69596f93b3 (patch)
treef7abb08bfdf35d1e876f93d24ce44072d2f6ed72 /include/linux/inetdevice.h
parentf5539b5bfa2e00f2a6fd35731db66142a2f327c0 (diff)
igmp: RCU conversion of in_dev->mc_list
in_dev->mc_list is protected by one rwlock (in_dev->mc_list_lock). This can easily be converted to a RCU protection. Writers hold RTNL, so mc_list_lock is removed, not replaced by a spinlock. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Cc: Cypher Wu <cypher.w@gmail.com> Cc: Américo Wang <xiyou.wangcong@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/inetdevice.h')
-rw-r--r--include/linux/inetdevice.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h
index ccd5b07d678d..380ba6bc5db1 100644
--- a/include/linux/inetdevice.h
+++ b/include/linux/inetdevice.h
@@ -52,9 +52,8 @@ struct in_device {
52 atomic_t refcnt; 52 atomic_t refcnt;
53 int dead; 53 int dead;
54 struct in_ifaddr *ifa_list; /* IP ifaddr chain */ 54 struct in_ifaddr *ifa_list; /* IP ifaddr chain */
55 rwlock_t mc_list_lock; 55 struct ip_mc_list __rcu *mc_list; /* IP multicast filter chain */
56 struct ip_mc_list *mc_list; /* IP multicast filter chain */ 56 int mc_count; /* Number of installed mcasts */
57 int mc_count; /* Number of installed mcasts */
58 spinlock_t mc_tomb_lock; 57 spinlock_t mc_tomb_lock;
59 struct ip_mc_list *mc_tomb; 58 struct ip_mc_list *mc_tomb;
60 unsigned long mr_v1_seen; 59 unsigned long mr_v1_seen;