Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland...
[firefly-linux-kernel-4.4.55.git] / net / bluetooth / af_bluetooth.c
index 062124cd89cf2a560cff39b80b7f3cbcdb66c1a3..cdcfcabb34ab8daf5b2275f52084c055926dac73 100644 (file)
@@ -199,15 +199,14 @@ struct sock *bt_accept_dequeue(struct sock *parent, struct socket *newsock)
 
        BT_DBG("parent %p", parent);
 
-       local_bh_disable();
        list_for_each_safe(p, n, &bt_sk(parent)->accept_q) {
                sk = (struct sock *) list_entry(p, struct bt_sock, accept_q);
 
-               bh_lock_sock(sk);
+               lock_sock(sk);
 
                /* FIXME: Is this check still needed */
                if (sk->sk_state == BT_CLOSED) {
-                       bh_unlock_sock(sk);
+                       release_sock(sk);
                        bt_accept_unlink(sk);
                        continue;
                }
@@ -218,14 +217,12 @@ struct sock *bt_accept_dequeue(struct sock *parent, struct socket *newsock)
                        if (newsock)
                                sock_graft(sk, newsock);
 
-                       bh_unlock_sock(sk);
-                       local_bh_enable();
+                       release_sock(sk);
                        return sk;
                }
 
-               bh_unlock_sock(sk);
+               release_sock(sk);
        }
-       local_bh_enable();
 
        return NULL;
 }