diff options
Diffstat (limited to 'net/ipv6/mcast.c')
-rw-r--r-- | net/ipv6/mcast.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c index 1f9c44442e65..bcd971915969 100644 --- a/net/ipv6/mcast.c +++ b/net/ipv6/mcast.c | |||
@@ -793,10 +793,10 @@ static void mld_add_delrec(struct inet6_dev *idev, struct ifmcaddr6 *im) | |||
793 | } | 793 | } |
794 | spin_unlock_bh(&im->mca_lock); | 794 | spin_unlock_bh(&im->mca_lock); |
795 | 795 | ||
796 | write_lock_bh(&idev->mc_lock); | 796 | spin_lock_bh(&idev->mc_lock); |
797 | pmc->next = idev->mc_tomb; | 797 | pmc->next = idev->mc_tomb; |
798 | idev->mc_tomb = pmc; | 798 | idev->mc_tomb = pmc; |
799 | write_unlock_bh(&idev->mc_lock); | 799 | spin_unlock_bh(&idev->mc_lock); |
800 | } | 800 | } |
801 | 801 | ||
802 | static void mld_del_delrec(struct inet6_dev *idev, struct in6_addr *pmca) | 802 | static void mld_del_delrec(struct inet6_dev *idev, struct in6_addr *pmca) |
@@ -804,7 +804,7 @@ static void mld_del_delrec(struct inet6_dev *idev, struct in6_addr *pmca) | |||
804 | struct ifmcaddr6 *pmc, *pmc_prev; | 804 | struct ifmcaddr6 *pmc, *pmc_prev; |
805 | struct ip6_sf_list *psf, *psf_next; | 805 | struct ip6_sf_list *psf, *psf_next; |
806 | 806 | ||
807 | write_lock_bh(&idev->mc_lock); | 807 | spin_lock_bh(&idev->mc_lock); |
808 | pmc_prev = NULL; | 808 | pmc_prev = NULL; |
809 | for (pmc=idev->mc_tomb; pmc; pmc=pmc->next) { | 809 | for (pmc=idev->mc_tomb; pmc; pmc=pmc->next) { |
810 | if (ipv6_addr_equal(&pmc->mca_addr, pmca)) | 810 | if (ipv6_addr_equal(&pmc->mca_addr, pmca)) |
@@ -817,7 +817,8 @@ static void mld_del_delrec(struct inet6_dev *idev, struct in6_addr *pmca) | |||
817 | else | 817 | else |
818 | idev->mc_tomb = pmc->next; | 818 | idev->mc_tomb = pmc->next; |
819 | } | 819 | } |
820 | write_unlock_bh(&idev->mc_lock); | 820 | spin_unlock_bh(&idev->mc_lock); |
821 | |||
821 | if (pmc) { | 822 | if (pmc) { |
822 | for (psf=pmc->mca_tomb; psf; psf=psf_next) { | 823 | for (psf=pmc->mca_tomb; psf; psf=psf_next) { |
823 | psf_next = psf->sf_next; | 824 | psf_next = psf->sf_next; |
@@ -832,10 +833,10 @@ static void mld_clear_delrec(struct inet6_dev *idev) | |||
832 | { | 833 | { |
833 | struct ifmcaddr6 *pmc, *nextpmc; | 834 | struct ifmcaddr6 *pmc, *nextpmc; |
834 | 835 | ||
835 | write_lock_bh(&idev->mc_lock); | 836 | spin_lock_bh(&idev->mc_lock); |
836 | pmc = idev->mc_tomb; | 837 | pmc = idev->mc_tomb; |
837 | idev->mc_tomb = NULL; | 838 | idev->mc_tomb = NULL; |
838 | write_unlock_bh(&idev->mc_lock); | 839 | spin_unlock_bh(&idev->mc_lock); |
839 | 840 | ||
840 | for (; pmc; pmc = nextpmc) { | 841 | for (; pmc; pmc = nextpmc) { |
841 | nextpmc = pmc->next; | 842 | nextpmc = pmc->next; |
@@ -1696,7 +1697,7 @@ static void mld_send_cr(struct inet6_dev *idev) | |||
1696 | int type, dtype; | 1697 | int type, dtype; |
1697 | 1698 | ||
1698 | read_lock_bh(&idev->lock); | 1699 | read_lock_bh(&idev->lock); |
1699 | write_lock_bh(&idev->mc_lock); | 1700 | spin_lock(&idev->mc_lock); |
1700 | 1701 | ||
1701 | /* deleted MCA's */ | 1702 | /* deleted MCA's */ |
1702 | pmc_prev = NULL; | 1703 | pmc_prev = NULL; |
@@ -1730,7 +1731,7 @@ static void mld_send_cr(struct inet6_dev *idev) | |||
1730 | } else | 1731 | } else |
1731 | pmc_prev = pmc; | 1732 | pmc_prev = pmc; |
1732 | } | 1733 | } |
1733 | write_unlock_bh(&idev->mc_lock); | 1734 | spin_unlock(&idev->mc_lock); |
1734 | 1735 | ||
1735 | /* change recs */ | 1736 | /* change recs */ |
1736 | for (pmc=idev->mc_list; pmc; pmc=pmc->next) { | 1737 | for (pmc=idev->mc_list; pmc; pmc=pmc->next) { |
@@ -2311,7 +2312,7 @@ void ipv6_mc_up(struct inet6_dev *idev) | |||
2311 | void ipv6_mc_init_dev(struct inet6_dev *idev) | 2312 | void ipv6_mc_init_dev(struct inet6_dev *idev) |
2312 | { | 2313 | { |
2313 | write_lock_bh(&idev->lock); | 2314 | write_lock_bh(&idev->lock); |
2314 | rwlock_init(&idev->mc_lock); | 2315 | spin_lock_init(&idev->mc_lock); |
2315 | idev->mc_gq_running = 0; | 2316 | idev->mc_gq_running = 0; |
2316 | setup_timer(&idev->mc_gq_timer, mld_gq_timer_expire, | 2317 | setup_timer(&idev->mc_gq_timer, mld_gq_timer_expire, |
2317 | (unsigned long)idev); | 2318 | (unsigned long)idev); |
@@ -2646,7 +2647,7 @@ static const struct file_operations igmp6_mcf_seq_fops = { | |||
2646 | .release = seq_release_net, | 2647 | .release = seq_release_net, |
2647 | }; | 2648 | }; |
2648 | 2649 | ||
2649 | static int igmp6_proc_init(struct net *net) | 2650 | static int __net_init igmp6_proc_init(struct net *net) |
2650 | { | 2651 | { |
2651 | int err; | 2652 | int err; |
2652 | 2653 | ||
@@ -2666,23 +2667,22 @@ out_proc_net_igmp6: | |||
2666 | goto out; | 2667 | goto out; |
2667 | } | 2668 | } |
2668 | 2669 | ||
2669 | static void igmp6_proc_exit(struct net *net) | 2670 | static void __net_exit igmp6_proc_exit(struct net *net) |
2670 | { | 2671 | { |
2671 | proc_net_remove(net, "mcfilter6"); | 2672 | proc_net_remove(net, "mcfilter6"); |
2672 | proc_net_remove(net, "igmp6"); | 2673 | proc_net_remove(net, "igmp6"); |
2673 | } | 2674 | } |
2674 | #else | 2675 | #else |
2675 | static int igmp6_proc_init(struct net *net) | 2676 | static inline int igmp6_proc_init(struct net *net) |
2676 | { | 2677 | { |
2677 | return 0; | 2678 | return 0; |
2678 | } | 2679 | } |
2679 | static void igmp6_proc_exit(struct net *net) | 2680 | static inline void igmp6_proc_exit(struct net *net) |
2680 | { | 2681 | { |
2681 | ; | ||
2682 | } | 2682 | } |
2683 | #endif | 2683 | #endif |
2684 | 2684 | ||
2685 | static int igmp6_net_init(struct net *net) | 2685 | static int __net_init igmp6_net_init(struct net *net) |
2686 | { | 2686 | { |
2687 | int err; | 2687 | int err; |
2688 | 2688 | ||
@@ -2708,7 +2708,7 @@ out_sock_create: | |||
2708 | goto out; | 2708 | goto out; |
2709 | } | 2709 | } |
2710 | 2710 | ||
2711 | static void igmp6_net_exit(struct net *net) | 2711 | static void __net_exit igmp6_net_exit(struct net *net) |
2712 | { | 2712 | { |
2713 | inet_ctl_sock_destroy(net->ipv6.igmp_sk); | 2713 | inet_ctl_sock_destroy(net->ipv6.igmp_sk); |
2714 | igmp6_proc_exit(net); | 2714 | igmp6_proc_exit(net); |