diff options
Diffstat (limited to 'net/ipv6/mcast.c')
-rw-r--r-- | net/ipv6/mcast.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c index 6c2758951d60..3e308fb41b49 100644 --- a/net/ipv6/mcast.c +++ b/net/ipv6/mcast.c | |||
@@ -2331,9 +2331,8 @@ static inline struct ifmcaddr6 *igmp6_mc_get_first(struct seq_file *seq) | |||
2331 | struct ifmcaddr6 *im = NULL; | 2331 | struct ifmcaddr6 *im = NULL; |
2332 | struct igmp6_mc_iter_state *state = igmp6_mc_seq_private(seq); | 2332 | struct igmp6_mc_iter_state *state = igmp6_mc_seq_private(seq); |
2333 | 2333 | ||
2334 | for (state->dev = dev_base, state->idev = NULL; | 2334 | state->idev = NULL; |
2335 | state->dev; | 2335 | for_each_netdev(state->dev) { |
2336 | state->dev = state->dev->next) { | ||
2337 | struct inet6_dev *idev; | 2336 | struct inet6_dev *idev; |
2338 | idev = in6_dev_get(state->dev); | 2337 | idev = in6_dev_get(state->dev); |
2339 | if (!idev) | 2338 | if (!idev) |
@@ -2360,7 +2359,7 @@ static struct ifmcaddr6 *igmp6_mc_get_next(struct seq_file *seq, struct ifmcaddr | |||
2360 | read_unlock_bh(&state->idev->lock); | 2359 | read_unlock_bh(&state->idev->lock); |
2361 | in6_dev_put(state->idev); | 2360 | in6_dev_put(state->idev); |
2362 | } | 2361 | } |
2363 | state->dev = state->dev->next; | 2362 | state->dev = next_net_device(state->dev); |
2364 | if (!state->dev) { | 2363 | if (!state->dev) { |
2365 | state->idev = NULL; | 2364 | state->idev = NULL; |
2366 | break; | 2365 | break; |
@@ -2475,9 +2474,9 @@ static inline struct ip6_sf_list *igmp6_mcf_get_first(struct seq_file *seq) | |||
2475 | struct ifmcaddr6 *im = NULL; | 2474 | struct ifmcaddr6 *im = NULL; |
2476 | struct igmp6_mcf_iter_state *state = igmp6_mcf_seq_private(seq); | 2475 | struct igmp6_mcf_iter_state *state = igmp6_mcf_seq_private(seq); |
2477 | 2476 | ||
2478 | for (state->dev = dev_base, state->idev = NULL, state->im = NULL; | 2477 | state->idev = NULL; |
2479 | state->dev; | 2478 | state->im = NULL; |
2480 | state->dev = state->dev->next) { | 2479 | for_each_netdev(state->dev) { |
2481 | struct inet6_dev *idev; | 2480 | struct inet6_dev *idev; |
2482 | idev = in6_dev_get(state->dev); | 2481 | idev = in6_dev_get(state->dev); |
2483 | if (unlikely(idev == NULL)) | 2482 | if (unlikely(idev == NULL)) |
@@ -2513,7 +2512,7 @@ static struct ip6_sf_list *igmp6_mcf_get_next(struct seq_file *seq, struct ip6_s | |||
2513 | read_unlock_bh(&state->idev->lock); | 2512 | read_unlock_bh(&state->idev->lock); |
2514 | in6_dev_put(state->idev); | 2513 | in6_dev_put(state->idev); |
2515 | } | 2514 | } |
2516 | state->dev = state->dev->next; | 2515 | state->dev = next_net_device(state->dev); |
2517 | if (!state->dev) { | 2516 | if (!state->dev) { |
2518 | state->idev = NULL; | 2517 | state->idev = NULL; |
2519 | goto out; | 2518 | goto out; |