diff options
| author | Jens Axboe <axboe@kernel.dk> | 2011-10-19 14:30:42 +0200 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2011-10-19 14:30:42 +0200 |
| commit | 5c04b426f2e8b46cfc7969a35b2631063a3c646c (patch) | |
| tree | 2d27d9f5d2fe5d5e8fbc01a467ec58bcb50235c1 /net/bluetooth/af_bluetooth.c | |
| parent | 499337bb6511e665a236a6a947f819d98ea340c6 (diff) | |
| parent | 899e3ee404961a90b828ad527573aaaac39f0ab1 (diff) | |
Merge branch 'v3.1-rc10' into for-3.2/core
Conflicts:
block/blk-core.c
include/linux/blkdev.h
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'net/bluetooth/af_bluetooth.c')
| -rw-r--r-- | net/bluetooth/af_bluetooth.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c index 8add9b499912..117e0d161780 100644 --- a/net/bluetooth/af_bluetooth.c +++ b/net/bluetooth/af_bluetooth.c @@ -494,9 +494,8 @@ int bt_sock_wait_state(struct sock *sk, int state, unsigned long timeo) BT_DBG("sk %p", sk); add_wait_queue(sk_sleep(sk), &wait); + set_current_state(TASK_INTERRUPTIBLE); while (sk->sk_state != state) { - set_current_state(TASK_INTERRUPTIBLE); - if (!timeo) { err = -EINPROGRESS; break; @@ -510,12 +509,13 @@ int bt_sock_wait_state(struct sock *sk, int state, unsigned long timeo) release_sock(sk); timeo = schedule_timeout(timeo); lock_sock(sk); + set_current_state(TASK_INTERRUPTIBLE); err = sock_error(sk); if (err) break; } - set_current_state(TASK_RUNNING); + __set_current_state(TASK_RUNNING); remove_wait_queue(sk_sleep(sk), &wait); return err; } |
