aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/addrconf.c
diff options
context:
space:
mode:
authorstephen hemminger <shemminger@vyatta.com>2010-02-08 14:48:52 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-12 15:28:01 -0500
commit21809fafa042fcfff3f788419bed99f3c289745c (patch)
tree9f9647427cd85e69e9afac0813777a8e8db8399e /net/ipv6/addrconf.c
parentdc2b99f71ef477a31020511876ab4403fb7c4420 (diff)
IPv6: remove trivial nested _bh suffix
Don't need to disable bottom half it is already down in the previous lock. Move some blank lines to group locking in same context. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/addrconf.c')
-rw-r--r--net/ipv6/addrconf.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index b0e1430b64f1..764ad37ca070 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -2802,14 +2802,14 @@ static void addrconf_dad_start(struct inet6_ifaddr *ifp, u32 flags)
2802 read_lock_bh(&idev->lock); 2802 read_lock_bh(&idev->lock);
2803 if (ifp->dead) 2803 if (ifp->dead)
2804 goto out; 2804 goto out;
2805 spin_lock_bh(&ifp->lock);
2806 2805
2806 spin_lock(&ifp->lock);
2807 if (dev->flags&(IFF_NOARP|IFF_LOOPBACK) || 2807 if (dev->flags&(IFF_NOARP|IFF_LOOPBACK) ||
2808 idev->cnf.accept_dad < 1 || 2808 idev->cnf.accept_dad < 1 ||
2809 !(ifp->flags&IFA_F_TENTATIVE) || 2809 !(ifp->flags&IFA_F_TENTATIVE) ||
2810 ifp->flags & IFA_F_NODAD) { 2810 ifp->flags & IFA_F_NODAD) {
2811 ifp->flags &= ~(IFA_F_TENTATIVE|IFA_F_OPTIMISTIC|IFA_F_DADFAILED); 2811 ifp->flags &= ~(IFA_F_TENTATIVE|IFA_F_OPTIMISTIC|IFA_F_DADFAILED);
2812 spin_unlock_bh(&ifp->lock); 2812 spin_unlock(&ifp->lock);
2813 read_unlock_bh(&idev->lock); 2813 read_unlock_bh(&idev->lock);
2814 2814
2815 addrconf_dad_completed(ifp); 2815 addrconf_dad_completed(ifp);
@@ -2817,7 +2817,7 @@ static void addrconf_dad_start(struct inet6_ifaddr *ifp, u32 flags)
2817 } 2817 }
2818 2818
2819 if (!(idev->if_flags & IF_READY)) { 2819 if (!(idev->if_flags & IF_READY)) {
2820 spin_unlock_bh(&ifp->lock); 2820 spin_unlock(&ifp->lock);
2821 read_unlock_bh(&idev->lock); 2821 read_unlock_bh(&idev->lock);
2822 /* 2822 /*
2823 * If the device is not ready: 2823 * If the device is not ready:
@@ -2837,7 +2837,7 @@ static void addrconf_dad_start(struct inet6_ifaddr *ifp, u32 flags)
2837 ip6_ins_rt(ifp->rt); 2837 ip6_ins_rt(ifp->rt);
2838 2838
2839 addrconf_dad_kick(ifp); 2839 addrconf_dad_kick(ifp);
2840 spin_unlock_bh(&ifp->lock); 2840 spin_unlock(&ifp->lock);
2841out: 2841out:
2842 read_unlock_bh(&idev->lock); 2842 read_unlock_bh(&idev->lock);
2843} 2843}
@@ -2853,14 +2853,15 @@ static void addrconf_dad_timer(unsigned long data)
2853 read_unlock_bh(&idev->lock); 2853 read_unlock_bh(&idev->lock);
2854 goto out; 2854 goto out;
2855 } 2855 }
2856 spin_lock_bh(&ifp->lock); 2856
2857 spin_lock(&ifp->lock);
2857 if (ifp->probes == 0) { 2858 if (ifp->probes == 0) {
2858 /* 2859 /*
2859 * DAD was successful 2860 * DAD was successful
2860 */ 2861 */
2861 2862
2862 ifp->flags &= ~(IFA_F_TENTATIVE|IFA_F_OPTIMISTIC|IFA_F_DADFAILED); 2863 ifp->flags &= ~(IFA_F_TENTATIVE|IFA_F_OPTIMISTIC|IFA_F_DADFAILED);
2863 spin_unlock_bh(&ifp->lock); 2864 spin_unlock(&ifp->lock);
2864 read_unlock_bh(&idev->lock); 2865 read_unlock_bh(&idev->lock);
2865 2866
2866 addrconf_dad_completed(ifp); 2867 addrconf_dad_completed(ifp);
@@ -2870,7 +2871,7 @@ static void addrconf_dad_timer(unsigned long data)
2870 2871
2871 ifp->probes--; 2872 ifp->probes--;
2872 addrconf_mod_timer(ifp, AC_DAD, ifp->idev->nd_parms->retrans_time); 2873 addrconf_mod_timer(ifp, AC_DAD, ifp->idev->nd_parms->retrans_time);
2873 spin_unlock_bh(&ifp->lock); 2874 spin_unlock(&ifp->lock);
2874 read_unlock_bh(&idev->lock); 2875 read_unlock_bh(&idev->lock);
2875 2876
2876 /* send a neighbour solicitation for our addr */ 2877 /* send a neighbour solicitation for our addr */
@@ -2918,12 +2919,12 @@ static void addrconf_dad_run(struct inet6_dev *idev) {
2918 2919
2919 read_lock_bh(&idev->lock); 2920 read_lock_bh(&idev->lock);
2920 for (ifp = idev->addr_list; ifp; ifp = ifp->if_next) { 2921 for (ifp = idev->addr_list; ifp; ifp = ifp->if_next) {
2921 spin_lock_bh(&ifp->lock); 2922 spin_lock(&ifp->lock);
2922 if (!(ifp->flags & IFA_F_TENTATIVE)) { 2923 if (!(ifp->flags & IFA_F_TENTATIVE)) {
2923 spin_unlock_bh(&ifp->lock); 2924 spin_unlock(&ifp->lock);
2924 continue; 2925 continue;
2925 } 2926 }
2926 spin_unlock_bh(&ifp->lock); 2927 spin_unlock(&ifp->lock);
2927 addrconf_dad_kick(ifp); 2928 addrconf_dad_kick(ifp);
2928 } 2929 }
2929 read_unlock_bh(&idev->lock); 2930 read_unlock_bh(&idev->lock);