diff options
Diffstat (limited to 'net/iucv/af_iucv.c')
| -rw-r--r-- | net/iucv/af_iucv.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c index c18286a2167b..c8b4599a752e 100644 --- a/net/iucv/af_iucv.c +++ b/net/iucv/af_iucv.c | |||
| @@ -59,7 +59,7 @@ do { \ | |||
| 59 | DEFINE_WAIT(__wait); \ | 59 | DEFINE_WAIT(__wait); \ |
| 60 | long __timeo = timeo; \ | 60 | long __timeo = timeo; \ |
| 61 | ret = 0; \ | 61 | ret = 0; \ |
| 62 | prepare_to_wait(sk->sk_sleep, &__wait, TASK_INTERRUPTIBLE); \ | 62 | prepare_to_wait(sk_sleep(sk), &__wait, TASK_INTERRUPTIBLE); \ |
| 63 | while (!(condition)) { \ | 63 | while (!(condition)) { \ |
| 64 | if (!__timeo) { \ | 64 | if (!__timeo) { \ |
| 65 | ret = -EAGAIN; \ | 65 | ret = -EAGAIN; \ |
| @@ -76,7 +76,7 @@ do { \ | |||
| 76 | if (ret) \ | 76 | if (ret) \ |
| 77 | break; \ | 77 | break; \ |
| 78 | } \ | 78 | } \ |
| 79 | finish_wait(sk->sk_sleep, &__wait); \ | 79 | finish_wait(sk_sleep(sk), &__wait); \ |
| 80 | } while (0) | 80 | } while (0) |
| 81 | 81 | ||
| 82 | #define iucv_sock_wait(sk, condition, timeo) \ | 82 | #define iucv_sock_wait(sk, condition, timeo) \ |
| @@ -136,7 +136,6 @@ static void afiucv_pm_complete(struct device *dev) | |||
| 136 | #ifdef CONFIG_PM_DEBUG | 136 | #ifdef CONFIG_PM_DEBUG |
| 137 | printk(KERN_WARNING "afiucv_pm_complete\n"); | 137 | printk(KERN_WARNING "afiucv_pm_complete\n"); |
| 138 | #endif | 138 | #endif |
| 139 | return; | ||
| 140 | } | 139 | } |
| 141 | 140 | ||
| 142 | /** | 141 | /** |
| @@ -305,11 +304,14 @@ static inline int iucv_below_msglim(struct sock *sk) | |||
| 305 | */ | 304 | */ |
| 306 | static void iucv_sock_wake_msglim(struct sock *sk) | 305 | static void iucv_sock_wake_msglim(struct sock *sk) |
| 307 | { | 306 | { |
| 308 | read_lock(&sk->sk_callback_lock); | 307 | struct socket_wq *wq; |
| 309 | if (sk_has_sleeper(sk)) | 308 | |
| 310 | wake_up_interruptible_all(sk->sk_sleep); | 309 | rcu_read_lock(); |
| 310 | wq = rcu_dereference(sk->sk_wq); | ||
| 311 | if (wq_has_sleeper(wq)) | ||
| 312 | wake_up_interruptible_all(&wq->wait); | ||
| 311 | sk_wake_async(sk, SOCK_WAKE_SPACE, POLL_OUT); | 313 | sk_wake_async(sk, SOCK_WAKE_SPACE, POLL_OUT); |
| 312 | read_unlock(&sk->sk_callback_lock); | 314 | rcu_read_unlock(); |
| 313 | } | 315 | } |
| 314 | 316 | ||
| 315 | /* Timers */ | 317 | /* Timers */ |
| @@ -795,7 +797,7 @@ static int iucv_sock_accept(struct socket *sock, struct socket *newsock, | |||
| 795 | timeo = sock_rcvtimeo(sk, flags & O_NONBLOCK); | 797 | timeo = sock_rcvtimeo(sk, flags & O_NONBLOCK); |
| 796 | 798 | ||
| 797 | /* Wait for an incoming connection */ | 799 | /* Wait for an incoming connection */ |
| 798 | add_wait_queue_exclusive(sk->sk_sleep, &wait); | 800 | add_wait_queue_exclusive(sk_sleep(sk), &wait); |
| 799 | while (!(nsk = iucv_accept_dequeue(sk, newsock))) { | 801 | while (!(nsk = iucv_accept_dequeue(sk, newsock))) { |
| 800 | set_current_state(TASK_INTERRUPTIBLE); | 802 | set_current_state(TASK_INTERRUPTIBLE); |
| 801 | if (!timeo) { | 803 | if (!timeo) { |
| @@ -819,7 +821,7 @@ static int iucv_sock_accept(struct socket *sock, struct socket *newsock, | |||
| 819 | } | 821 | } |
| 820 | 822 | ||
| 821 | set_current_state(TASK_RUNNING); | 823 | set_current_state(TASK_RUNNING); |
| 822 | remove_wait_queue(sk->sk_sleep, &wait); | 824 | remove_wait_queue(sk_sleep(sk), &wait); |
| 823 | 825 | ||
| 824 | if (err) | 826 | if (err) |
| 825 | goto done; | 827 | goto done; |
| @@ -1269,7 +1271,7 @@ unsigned int iucv_sock_poll(struct file *file, struct socket *sock, | |||
| 1269 | struct sock *sk = sock->sk; | 1271 | struct sock *sk = sock->sk; |
| 1270 | unsigned int mask = 0; | 1272 | unsigned int mask = 0; |
| 1271 | 1273 | ||
| 1272 | sock_poll_wait(file, sk->sk_sleep, wait); | 1274 | sock_poll_wait(file, sk_sleep(sk), wait); |
| 1273 | 1275 | ||
| 1274 | if (sk->sk_state == IUCV_LISTEN) | 1276 | if (sk->sk_state == IUCV_LISTEN) |
| 1275 | return iucv_accept_poll(sk); | 1277 | return iucv_accept_poll(sk); |
