aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/l2cap.c
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2010-04-20 09:03:51 -0400
committerDavid S. Miller <davem@davemloft.net>2010-04-20 19:37:13 -0400
commitaa395145165cb06a0d0885221bbe0ce4a564391d (patch)
tree118b0403621f10db8dc3dbf12079f9af5b19e05d /net/bluetooth/l2cap.c
parentab9304717f7624c41927f442e6b6d418b2d8b3e4 (diff)
net: sk_sleep() helper
Define a new function to return the waitqueue of a "struct sock". static inline wait_queue_head_t *sk_sleep(struct sock *sk) { return sk->sk_sleep; } Change all read occurrences of sk_sleep by a call to this function. Needed for a future RCU conversion. sk_sleep wont be a field directly available. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bluetooth/l2cap.c')
-rw-r--r--net/bluetooth/l2cap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index 99d68c34e4f1..c1e60eed5a97 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -1147,7 +1147,7 @@ static int l2cap_sock_accept(struct socket *sock, struct socket *newsock, int fl
1147 BT_DBG("sk %p timeo %ld", sk, timeo); 1147 BT_DBG("sk %p timeo %ld", sk, timeo);
1148 1148
1149 /* Wait for an incoming connection. (wake-one). */ 1149 /* Wait for an incoming connection. (wake-one). */
1150 add_wait_queue_exclusive(sk->sk_sleep, &wait); 1150 add_wait_queue_exclusive(sk_sleep(sk), &wait);
1151 while (!(nsk = bt_accept_dequeue(sk, newsock))) { 1151 while (!(nsk = bt_accept_dequeue(sk, newsock))) {
1152 set_current_state(TASK_INTERRUPTIBLE); 1152 set_current_state(TASK_INTERRUPTIBLE);
1153 if (!timeo) { 1153 if (!timeo) {
@@ -1170,7 +1170,7 @@ static int l2cap_sock_accept(struct socket *sock, struct socket *newsock, int fl
1170 } 1170 }
1171 } 1171 }
1172 set_current_state(TASK_RUNNING); 1172 set_current_state(TASK_RUNNING);
1173 remove_wait_queue(sk->sk_sleep, &wait); 1173 remove_wait_queue(sk_sleep(sk), &wait);
1174 1174
1175 if (err) 1175 if (err)
1176 goto done; 1176 goto done;