Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 279386
b: refs/heads/master
c: 8a154a8
h: refs/heads/master
v: v3
  • Loading branch information
Gustavo F. Padovan committed Dec 22, 2011
1 parent 82263f3 commit fddb2b2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f1e91e1640d808d332498a6b09b2bcd01462eff9
refs/heads/master: 8a154a8feb805394d1fd46281becaf876e18860a
11 changes: 4 additions & 7 deletions trunk/net/bluetooth/af_bluetooth.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand Down

0 comments on commit fddb2b2

Please sign in to comment.