diff options
author | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2012-10-12 07:35:23 -0400 |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2012-10-15 08:42:52 -0400 |
commit | 644912e18ac1d27f57f6673b0236b568ff750fd1 (patch) | |
tree | d7d5609fb109e6a84eed05b581efb7830a9a32c5 | |
parent | b699ec0d99825713d30a057c432d0e29f07c5490 (diff) |
Bluetooth: Move bt_accept_enqueue() to l2cap_sock.c
This is part of the move the parent socket usage to l2cap_sock.c
The change is safe when it comes to locking, bt_accept_enqueue() is still
protected by the parent socket lock inside the
l2cap_sock_new_connection_cb() code.
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
-rw-r--r-- | net/bluetooth/l2cap_core.c | 4 | ||||
-rw-r--r-- | net/bluetooth/l2cap_sock.c | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index 2fb37dee7754..9d84050bed2c 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c | |||
@@ -1230,8 +1230,6 @@ static void l2cap_le_conn_ready(struct l2cap_conn *conn) | |||
1230 | bacpy(&bt_sk(sk)->src, conn->src); | 1230 | bacpy(&bt_sk(sk)->src, conn->src); |
1231 | bacpy(&bt_sk(sk)->dst, conn->dst); | 1231 | bacpy(&bt_sk(sk)->dst, conn->dst); |
1232 | 1232 | ||
1233 | bt_accept_enqueue(parent, sk); | ||
1234 | |||
1235 | l2cap_chan_add(conn, chan); | 1233 | l2cap_chan_add(conn, chan); |
1236 | 1234 | ||
1237 | l2cap_chan_ready(chan); | 1235 | l2cap_chan_ready(chan); |
@@ -3448,8 +3446,6 @@ static void __l2cap_connect(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, | |||
3448 | chan->psm = psm; | 3446 | chan->psm = psm; |
3449 | chan->dcid = scid; | 3447 | chan->dcid = scid; |
3450 | 3448 | ||
3451 | bt_accept_enqueue(parent, sk); | ||
3452 | |||
3453 | __l2cap_chan_add(conn, chan); | 3449 | __l2cap_chan_add(conn, chan); |
3454 | 3450 | ||
3455 | dcid = chan->scid; | 3451 | dcid = chan->scid; |
diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c index f95fc7ed0a09..d5093b853b05 100644 --- a/net/bluetooth/l2cap_sock.c +++ b/net/bluetooth/l2cap_sock.c | |||
@@ -949,6 +949,8 @@ static struct l2cap_chan *l2cap_sock_new_connection_cb(struct l2cap_chan *chan) | |||
949 | 949 | ||
950 | l2cap_sock_init(sk, parent); | 950 | l2cap_sock_init(sk, parent); |
951 | 951 | ||
952 | bt_accept_enqueue(parent, sk); | ||
953 | |||
952 | return l2cap_pi(sk)->chan; | 954 | return l2cap_pi(sk)->chan; |
953 | } | 955 | } |
954 | 956 | ||