diff options
Diffstat (limited to 'net/dccp/output.c')
-rw-r--r-- | net/dccp/output.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/net/dccp/output.c b/net/dccp/output.c index fc3f436440b4..aadbdb58758b 100644 --- a/net/dccp/output.c +++ b/net/dccp/output.c | |||
@@ -129,14 +129,14 @@ static int dccp_transmit_skb(struct sock *sk, struct sk_buff *skb) | |||
129 | break; | 129 | break; |
130 | } | 130 | } |
131 | 131 | ||
132 | icsk->icsk_af_ops->send_check(sk, 0, skb); | 132 | icsk->icsk_af_ops->send_check(sk, skb); |
133 | 133 | ||
134 | if (set_ack) | 134 | if (set_ack) |
135 | dccp_event_ack_sent(sk); | 135 | dccp_event_ack_sent(sk); |
136 | 136 | ||
137 | DCCP_INC_STATS(DCCP_MIB_OUTSEGS); | 137 | DCCP_INC_STATS(DCCP_MIB_OUTSEGS); |
138 | 138 | ||
139 | err = icsk->icsk_af_ops->queue_xmit(skb, 0); | 139 | err = icsk->icsk_af_ops->queue_xmit(skb); |
140 | return net_xmit_eval(err); | 140 | return net_xmit_eval(err); |
141 | } | 141 | } |
142 | return -ENOBUFS; | 142 | return -ENOBUFS; |
@@ -195,15 +195,17 @@ EXPORT_SYMBOL_GPL(dccp_sync_mss); | |||
195 | 195 | ||
196 | void dccp_write_space(struct sock *sk) | 196 | void dccp_write_space(struct sock *sk) |
197 | { | 197 | { |
198 | read_lock(&sk->sk_callback_lock); | 198 | struct socket_wq *wq; |
199 | 199 | ||
200 | if (sk_has_sleeper(sk)) | 200 | rcu_read_lock(); |
201 | wake_up_interruptible(sk->sk_sleep); | 201 | wq = rcu_dereference(sk->sk_wq); |
202 | if (wq_has_sleeper(wq)) | ||
203 | wake_up_interruptible(&wq->wait); | ||
202 | /* Should agree with poll, otherwise some programs break */ | 204 | /* Should agree with poll, otherwise some programs break */ |
203 | if (sock_writeable(sk)) | 205 | if (sock_writeable(sk)) |
204 | sk_wake_async(sk, SOCK_WAKE_SPACE, POLL_OUT); | 206 | sk_wake_async(sk, SOCK_WAKE_SPACE, POLL_OUT); |
205 | 207 | ||
206 | read_unlock(&sk->sk_callback_lock); | 208 | rcu_read_unlock(); |
207 | } | 209 | } |
208 | 210 | ||
209 | /** | 211 | /** |
@@ -225,7 +227,7 @@ static int dccp_wait_for_ccid(struct sock *sk, struct sk_buff *skb, int delay) | |||
225 | dccp_pr_debug("delayed send by %d msec\n", delay); | 227 | dccp_pr_debug("delayed send by %d msec\n", delay); |
226 | jiffdelay = msecs_to_jiffies(delay); | 228 | jiffdelay = msecs_to_jiffies(delay); |
227 | 229 | ||
228 | prepare_to_wait(sk->sk_sleep, &wait, TASK_INTERRUPTIBLE); | 230 | prepare_to_wait(sk_sleep(sk), &wait, TASK_INTERRUPTIBLE); |
229 | 231 | ||
230 | sk->sk_write_pending++; | 232 | sk->sk_write_pending++; |
231 | release_sock(sk); | 233 | release_sock(sk); |
@@ -241,7 +243,7 @@ static int dccp_wait_for_ccid(struct sock *sk, struct sk_buff *skb, int delay) | |||
241 | rc = ccid_hc_tx_send_packet(dp->dccps_hc_tx_ccid, sk, skb); | 243 | rc = ccid_hc_tx_send_packet(dp->dccps_hc_tx_ccid, sk, skb); |
242 | } while ((delay = rc) > 0); | 244 | } while ((delay = rc) > 0); |
243 | out: | 245 | out: |
244 | finish_wait(sk->sk_sleep, &wait); | 246 | finish_wait(sk_sleep(sk), &wait); |
245 | return rc; | 247 | return rc; |
246 | 248 | ||
247 | do_error: | 249 | do_error: |