diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-04-25 18:20:06 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-04-26 14:18:45 -0400 |
commit | 4a4771a58e13b46bfdc999fe481e550f8c6937ff (patch) | |
tree | 42bb025b051ba79efda403e1b843c2a9a1243946 | |
parent | be9e969d79e40c59142fa9e931aa6f085581b379 (diff) |
net: use sk_sleep()
Commit aa395145 (net: sk_sleep() helper) missed three files in the
conversion.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/macvtap.c | 6 | ||||
-rw-r--r-- | net/caif/caif_socket.c | 30 | ||||
-rw-r--r-- | net/rxrpc/ar-recvmsg.c | 6 |
3 files changed, 21 insertions, 21 deletions
diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c index 85d6420f8404..d97e1fd234ba 100644 --- a/drivers/net/macvtap.c +++ b/drivers/net/macvtap.c | |||
@@ -181,7 +181,7 @@ static int macvtap_forward(struct net_device *dev, struct sk_buff *skb) | |||
181 | return -ENOLINK; | 181 | return -ENOLINK; |
182 | 182 | ||
183 | skb_queue_tail(&q->sk.sk_receive_queue, skb); | 183 | skb_queue_tail(&q->sk.sk_receive_queue, skb); |
184 | wake_up_interruptible_poll(q->sk.sk_sleep, POLLIN | POLLRDNORM | POLLRDBAND); | 184 | wake_up_interruptible_poll(sk_sleep(&q->sk), POLLIN | POLLRDNORM | POLLRDBAND); |
185 | return 0; | 185 | return 0; |
186 | } | 186 | } |
187 | 187 | ||
@@ -562,7 +562,7 @@ static ssize_t macvtap_do_read(struct macvtap_queue *q, struct kiocb *iocb, | |||
562 | struct sk_buff *skb; | 562 | struct sk_buff *skb; |
563 | ssize_t ret = 0; | 563 | ssize_t ret = 0; |
564 | 564 | ||
565 | add_wait_queue(q->sk.sk_sleep, &wait); | 565 | add_wait_queue(sk_sleep(&q->sk), &wait); |
566 | while (len) { | 566 | while (len) { |
567 | current->state = TASK_INTERRUPTIBLE; | 567 | current->state = TASK_INTERRUPTIBLE; |
568 | 568 | ||
@@ -587,7 +587,7 @@ static ssize_t macvtap_do_read(struct macvtap_queue *q, struct kiocb *iocb, | |||
587 | } | 587 | } |
588 | 588 | ||
589 | current->state = TASK_RUNNING; | 589 | current->state = TASK_RUNNING; |
590 | remove_wait_queue(q->sk.sk_sleep, &wait); | 590 | remove_wait_queue(sk_sleep(&q->sk), &wait); |
591 | return ret; | 591 | return ret; |
592 | } | 592 | } |
593 | 593 | ||
diff --git a/net/caif/caif_socket.c b/net/caif/caif_socket.c index 90317e7d10b4..d455375789fb 100644 --- a/net/caif/caif_socket.c +++ b/net/caif/caif_socket.c | |||
@@ -169,7 +169,7 @@ static int caif_sktrecv_cb(struct cflayer *layr, struct cfpkt *pkt) | |||
169 | 169 | ||
170 | /* Signal reader that data is available. */ | 170 | /* Signal reader that data is available. */ |
171 | 171 | ||
172 | wake_up_interruptible(cf_sk->sk.sk_sleep); | 172 | wake_up_interruptible(sk_sleep(&cf_sk->sk)); |
173 | 173 | ||
174 | return 0; | 174 | return 0; |
175 | } | 175 | } |
@@ -203,7 +203,7 @@ static void caif_sktflowctrl_cb(struct cflayer *layr, | |||
203 | dbfs_atomic_inc(&cnt.num_tx_flow_on_ind); | 203 | dbfs_atomic_inc(&cnt.num_tx_flow_on_ind); |
204 | /* Signal reader that data is available. */ | 204 | /* Signal reader that data is available. */ |
205 | SET_TX_FLOW_ON(cf_sk); | 205 | SET_TX_FLOW_ON(cf_sk); |
206 | wake_up_interruptible(cf_sk->sk.sk_sleep); | 206 | wake_up_interruptible(sk_sleep(&cf_sk->sk)); |
207 | break; | 207 | break; |
208 | 208 | ||
209 | case CAIF_CTRLCMD_FLOW_OFF_IND: | 209 | case CAIF_CTRLCMD_FLOW_OFF_IND: |
@@ -217,7 +217,7 @@ static void caif_sktflowctrl_cb(struct cflayer *layr, | |||
217 | caif_assert(STATE_IS_OPEN(cf_sk)); | 217 | caif_assert(STATE_IS_OPEN(cf_sk)); |
218 | SET_PENDING_OFF(cf_sk); | 218 | SET_PENDING_OFF(cf_sk); |
219 | SET_TX_FLOW_ON(cf_sk); | 219 | SET_TX_FLOW_ON(cf_sk); |
220 | wake_up_interruptible(cf_sk->sk.sk_sleep); | 220 | wake_up_interruptible(sk_sleep(&cf_sk->sk)); |
221 | break; | 221 | break; |
222 | 222 | ||
223 | case CAIF_CTRLCMD_DEINIT_RSP: | 223 | case CAIF_CTRLCMD_DEINIT_RSP: |
@@ -225,8 +225,8 @@ static void caif_sktflowctrl_cb(struct cflayer *layr, | |||
225 | caif_assert(!STATE_IS_OPEN(cf_sk)); | 225 | caif_assert(!STATE_IS_OPEN(cf_sk)); |
226 | SET_PENDING_OFF(cf_sk); | 226 | SET_PENDING_OFF(cf_sk); |
227 | if (!STATE_IS_PENDING_DESTROY(cf_sk)) { | 227 | if (!STATE_IS_PENDING_DESTROY(cf_sk)) { |
228 | if (cf_sk->sk.sk_sleep != NULL) | 228 | if (sk_sleep(&cf_sk->sk) != NULL) |
229 | wake_up_interruptible(cf_sk->sk.sk_sleep); | 229 | wake_up_interruptible(sk_sleep(&cf_sk->sk)); |
230 | } | 230 | } |
231 | dbfs_atomic_inc(&cnt.num_deinit); | 231 | dbfs_atomic_inc(&cnt.num_deinit); |
232 | sock_put(&cf_sk->sk); | 232 | sock_put(&cf_sk->sk); |
@@ -238,7 +238,7 @@ static void caif_sktflowctrl_cb(struct cflayer *layr, | |||
238 | SET_STATE_CLOSED(cf_sk); | 238 | SET_STATE_CLOSED(cf_sk); |
239 | SET_PENDING_OFF(cf_sk); | 239 | SET_PENDING_OFF(cf_sk); |
240 | SET_TX_FLOW_OFF(cf_sk); | 240 | SET_TX_FLOW_OFF(cf_sk); |
241 | wake_up_interruptible(cf_sk->sk.sk_sleep); | 241 | wake_up_interruptible(sk_sleep(&cf_sk->sk)); |
242 | break; | 242 | break; |
243 | 243 | ||
244 | case CAIF_CTRLCMD_REMOTE_SHUTDOWN_IND: | 244 | case CAIF_CTRLCMD_REMOTE_SHUTDOWN_IND: |
@@ -247,7 +247,7 @@ static void caif_sktflowctrl_cb(struct cflayer *layr, | |||
247 | /* Use sk_shutdown to indicate remote shutdown indication */ | 247 | /* Use sk_shutdown to indicate remote shutdown indication */ |
248 | cf_sk->sk.sk_shutdown |= RCV_SHUTDOWN; | 248 | cf_sk->sk.sk_shutdown |= RCV_SHUTDOWN; |
249 | cf_sk->file_mode = 0; | 249 | cf_sk->file_mode = 0; |
250 | wake_up_interruptible(cf_sk->sk.sk_sleep); | 250 | wake_up_interruptible(sk_sleep(&cf_sk->sk)); |
251 | break; | 251 | break; |
252 | 252 | ||
253 | default: | 253 | default: |
@@ -325,7 +325,7 @@ static int caif_recvmsg(struct kiocb *iocb, struct socket *sock, | |||
325 | release_sock(&cf_sk->sk); | 325 | release_sock(&cf_sk->sk); |
326 | 326 | ||
327 | result = | 327 | result = |
328 | wait_event_interruptible(*cf_sk->sk.sk_sleep, | 328 | wait_event_interruptible(*sk_sleep(&cf_sk->sk), |
329 | !STATE_IS_PENDING(cf_sk)); | 329 | !STATE_IS_PENDING(cf_sk)); |
330 | 330 | ||
331 | lock_sock(&(cf_sk->sk)); | 331 | lock_sock(&(cf_sk->sk)); |
@@ -365,7 +365,7 @@ static int caif_recvmsg(struct kiocb *iocb, struct socket *sock, | |||
365 | release_sock(&cf_sk->sk); | 365 | release_sock(&cf_sk->sk); |
366 | 366 | ||
367 | /* Block reader until data arrives or socket is closed. */ | 367 | /* Block reader until data arrives or socket is closed. */ |
368 | if (wait_event_interruptible(*cf_sk->sk.sk_sleep, | 368 | if (wait_event_interruptible(*sk_sleep(&cf_sk->sk), |
369 | cfpkt_qpeek(cf_sk->pktq) | 369 | cfpkt_qpeek(cf_sk->pktq) |
370 | || STATE_IS_REMOTE_SHUTDOWN(cf_sk) | 370 | || STATE_IS_REMOTE_SHUTDOWN(cf_sk) |
371 | || !STATE_IS_OPEN(cf_sk)) == | 371 | || !STATE_IS_OPEN(cf_sk)) == |
@@ -537,7 +537,7 @@ static int caif_sendmsg(struct kiocb *kiocb, struct socket *sock, | |||
537 | * for its conclusion. | 537 | * for its conclusion. |
538 | */ | 538 | */ |
539 | result = | 539 | result = |
540 | wait_event_interruptible(*cf_sk->sk.sk_sleep, | 540 | wait_event_interruptible(*sk_sleep(&cf_sk->sk), |
541 | !STATE_IS_PENDING(cf_sk)); | 541 | !STATE_IS_PENDING(cf_sk)); |
542 | /* I want to be alone on cf_sk (except status and queue) */ | 542 | /* I want to be alone on cf_sk (except status and queue) */ |
543 | lock_sock(&(cf_sk->sk)); | 543 | lock_sock(&(cf_sk->sk)); |
@@ -573,7 +573,7 @@ static int caif_sendmsg(struct kiocb *kiocb, struct socket *sock, | |||
573 | release_sock(&cf_sk->sk); | 573 | release_sock(&cf_sk->sk); |
574 | 574 | ||
575 | /* Wait until flow is on or socket is closed */ | 575 | /* Wait until flow is on or socket is closed */ |
576 | if (wait_event_interruptible(*cf_sk->sk.sk_sleep, | 576 | if (wait_event_interruptible(*sk_sleep(&cf_sk->sk), |
577 | TX_FLOW_IS_ON(cf_sk) | 577 | TX_FLOW_IS_ON(cf_sk) |
578 | || !STATE_IS_OPEN(cf_sk) | 578 | || !STATE_IS_OPEN(cf_sk) |
579 | || STATE_IS_REMOTE_SHUTDOWN(cf_sk) | 579 | || STATE_IS_REMOTE_SHUTDOWN(cf_sk) |
@@ -650,7 +650,7 @@ static int caif_sendmsg(struct kiocb *kiocb, struct socket *sock, | |||
650 | release_sock(&cf_sk->sk); | 650 | release_sock(&cf_sk->sk); |
651 | 651 | ||
652 | /* Wait until flow is on or socket is closed */ | 652 | /* Wait until flow is on or socket is closed */ |
653 | if (wait_event_interruptible(*cf_sk->sk.sk_sleep, | 653 | if (wait_event_interruptible(*sk_sleep(&cf_sk->sk), |
654 | TX_FLOW_IS_ON(cf_sk) | 654 | TX_FLOW_IS_ON(cf_sk) |
655 | || !STATE_IS_OPEN(cf_sk) | 655 | || !STATE_IS_OPEN(cf_sk) |
656 | || STATE_IS_REMOTE_SHUTDOWN(cf_sk) | 656 | || STATE_IS_REMOTE_SHUTDOWN(cf_sk) |
@@ -898,7 +898,7 @@ static int caif_connect(struct socket *sock, struct sockaddr *uservaddr, | |||
898 | * for its conclusion. | 898 | * for its conclusion. |
899 | */ | 899 | */ |
900 | result = | 900 | result = |
901 | wait_event_interruptible(*cf_sk->sk.sk_sleep, | 901 | wait_event_interruptible(*sk_sleep(&cf_sk->sk), |
902 | !STATE_IS_PENDING(cf_sk)); | 902 | !STATE_IS_PENDING(cf_sk)); |
903 | 903 | ||
904 | lock_sock(&(cf_sk->sk)); | 904 | lock_sock(&(cf_sk->sk)); |
@@ -965,7 +965,7 @@ static int caif_connect(struct socket *sock, struct sockaddr *uservaddr, | |||
965 | release_sock(&cf_sk->sk); | 965 | release_sock(&cf_sk->sk); |
966 | 966 | ||
967 | result = | 967 | result = |
968 | wait_event_interruptible(*cf_sk->sk.sk_sleep, | 968 | wait_event_interruptible(*sk_sleep(&cf_sk->sk), |
969 | !STATE_IS_PENDING(cf_sk)); | 969 | !STATE_IS_PENDING(cf_sk)); |
970 | 970 | ||
971 | lock_sock(&(cf_sk->sk)); | 971 | lock_sock(&(cf_sk->sk)); |
@@ -1107,7 +1107,7 @@ static int caif_release(struct socket *sock) | |||
1107 | * CAIF stack. | 1107 | * CAIF stack. |
1108 | */ | 1108 | */ |
1109 | if (!(sock->file->f_flags & O_NONBLOCK)) { | 1109 | if (!(sock->file->f_flags & O_NONBLOCK)) { |
1110 | res = wait_event_interruptible(*cf_sk->sk.sk_sleep, | 1110 | res = wait_event_interruptible(*sk_sleep(&cf_sk->sk), |
1111 | !STATE_IS_PENDING(cf_sk)); | 1111 | !STATE_IS_PENDING(cf_sk)); |
1112 | 1112 | ||
1113 | if (res == -ERESTARTSYS) { | 1113 | if (res == -ERESTARTSYS) { |
diff --git a/net/rxrpc/ar-recvmsg.c b/net/rxrpc/ar-recvmsg.c index 60c2b94e6b54..0c65013e3bfe 100644 --- a/net/rxrpc/ar-recvmsg.c +++ b/net/rxrpc/ar-recvmsg.c | |||
@@ -91,7 +91,7 @@ int rxrpc_recvmsg(struct kiocb *iocb, struct socket *sock, | |||
91 | 91 | ||
92 | /* wait for a message to turn up */ | 92 | /* wait for a message to turn up */ |
93 | release_sock(&rx->sk); | 93 | release_sock(&rx->sk); |
94 | prepare_to_wait_exclusive(rx->sk.sk_sleep, &wait, | 94 | prepare_to_wait_exclusive(sk_sleep(&rx->sk), &wait, |
95 | TASK_INTERRUPTIBLE); | 95 | TASK_INTERRUPTIBLE); |
96 | ret = sock_error(&rx->sk); | 96 | ret = sock_error(&rx->sk); |
97 | if (ret) | 97 | if (ret) |
@@ -102,7 +102,7 @@ int rxrpc_recvmsg(struct kiocb *iocb, struct socket *sock, | |||
102 | goto wait_interrupted; | 102 | goto wait_interrupted; |
103 | timeo = schedule_timeout(timeo); | 103 | timeo = schedule_timeout(timeo); |
104 | } | 104 | } |
105 | finish_wait(rx->sk.sk_sleep, &wait); | 105 | finish_wait(sk_sleep(&rx->sk), &wait); |
106 | lock_sock(&rx->sk); | 106 | lock_sock(&rx->sk); |
107 | continue; | 107 | continue; |
108 | } | 108 | } |
@@ -356,7 +356,7 @@ csum_copy_error: | |||
356 | wait_interrupted: | 356 | wait_interrupted: |
357 | ret = sock_intr_errno(timeo); | 357 | ret = sock_intr_errno(timeo); |
358 | wait_error: | 358 | wait_error: |
359 | finish_wait(rx->sk.sk_sleep, &wait); | 359 | finish_wait(sk_sleep(&rx->sk), &wait); |
360 | if (continue_call) | 360 | if (continue_call) |
361 | rxrpc_put_call(continue_call); | 361 | rxrpc_put_call(continue_call); |
362 | if (copied) | 362 | if (copied) |