diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index 0f0e0f0279b8f3a7b6b565f78137e87495f1e07e..a1bf2f49e71662251f2303a61cdb007c5ffee49c 100644 --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c @@ -163,6 +163,16 @@ static void ip_ma_put(struct ip_mc_list *im) } } +#define for_each_pmc_rcu(in_dev, pmc) \ + for (pmc = rcu_dereference(in_dev->mc_list); \ + pmc != NULL; \ + pmc = rcu_dereference(pmc->next_rcu)) + +#define for_each_pmc_rtnl(in_dev, pmc) \ + for (pmc = rtnl_dereference(in_dev->mc_list); \ + pmc != NULL; \ + pmc = rtnl_dereference(pmc->next_rcu)) + #ifdef CONFIG_IP_MULTICAST /* @@ -502,16 +512,6 @@ static struct sk_buff *add_grec(struct sk_buff *skb, struct ip_mc_list *pmc, return skb; } -#define for_each_pmc_rcu(in_dev, pmc) \ - for (pmc = rcu_dereference(in_dev->mc_list); \ - pmc != NULL; \ - pmc = rcu_dereference(pmc->next_rcu)) - -#define for_each_pmc_rtnl(in_dev, pmc) \ - for (pmc = rtnl_dereference(in_dev->mc_list); \ - pmc != NULL; \ - pmc = rtnl_dereference(pmc->next_rcu)) - static int igmpv3_send_report(struct in_device *in_dev, struct ip_mc_list *pmc) { struct sk_buff *skb = NULL;