]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Bluetooth: Fix issues where sk_sleep() helper is needed now
authorMarcel Holtmann <marcel@holtmann.org>
Mon, 10 May 2010 09:33:10 +0000 (11:33 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 10 May 2010 09:33:10 +0000 (11:33 +0200)
There were some left-overs that used sk->sk_sleep instead of the new
sk_sleep() helper.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/l2cap.c

index ba49f9a3579e119f413d49dff50df799b1fd56a9..673a36886716fb036c9dda6e24f26a7506f070c4 100644 (file)
@@ -1248,7 +1248,7 @@ static int __l2cap_wait_ack(struct sock *sk)
        int err = 0;
        int timeo = HZ/5;
 
-       add_wait_queue(sk->sk_sleep, &wait);
+       add_wait_queue(sk_sleep(sk), &wait);
        while ((l2cap_pi(sk)->unacked_frames > 0 && l2cap_pi(sk)->conn)) {
                set_current_state(TASK_INTERRUPTIBLE);
 
@@ -1269,7 +1269,7 @@ static int __l2cap_wait_ack(struct sock *sk)
                        break;
        }
        set_current_state(TASK_RUNNING);
-       remove_wait_queue(sk->sk_sleep, &wait);
+       remove_wait_queue(sk_sleep(sk), &wait);
        return err;
 }
 
@@ -3544,7 +3544,7 @@ static void l2cap_busy_work(struct work_struct *work)
 
        lock_sock(sk);
 
-       add_wait_queue(sk->sk_sleep, &wait);
+       add_wait_queue(sk_sleep(sk), &wait);
        while ((skb = skb_peek(BUSY_QUEUE(sk)))) {
                set_current_state(TASK_INTERRUPTIBLE);
 
@@ -3603,7 +3603,7 @@ done:
        pi->conn_state &= ~L2CAP_CONN_RNR_SENT;
 
        set_current_state(TASK_RUNNING);
-       remove_wait_queue(sk->sk_sleep, &wait);
+       remove_wait_queue(sk_sleep(sk), &wait);
 
        release_sock(sk);
 }