diff options
author | Gerrit Renker <gerrit@erg.abdn.ac.uk> | 2007-11-24 19:12:06 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 17:55:01 -0500 |
commit | dcfbc7e97a2e3a0d73a2e41e1bddb988dcca701e (patch) | |
tree | 72f3e847a2cff031e8d9d7728065716da3ca0be9 /net/dccp/ccids/ccid2.c | |
parent | a302002516a094015e5d004b8d939a8a34559c82 (diff) |
[CCID2]: Remove misleading comment
This removes a comment which identifies an `issue' with dccp_write_xmit() where there is none.
The comment assumes it is possible that a packet is sent between the calls to
ccid_hc_tx_send_packet(),
dccp_transmit_skb(),
ccid_hc_tx_packet_sent()
(in the above order) in dccp_write_xmit().
I think that this is impossible, since dccp_write_xmit() is always called under lock:
* when called as dccp_write_xmit(sk, 1) from dccp_send_close(), the socket is locked
(see code comment above dccp_send_close());
* when called as dccp_write_xmit(sk, 0) from dccp_send_msg(), it is after lock_sock() has been called;
* when called as dccp_write_xmit(sk, 0) from dccp_write_xmit_timer(), bh_lock_sock() has been called
and the if/else statement has made sure that sk_lock.owner is not set;
* there are no other places where dccp_write_xmit() is called.
Furthermore, the debug statement for printing the sequence number of the packet just sent has been
removed, since the entire list is being printed anyway and so the entry of that number appears last.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp/ccids/ccid2.c')
-rw-r--r-- | net/dccp/ccids/ccid2.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/net/dccp/ccids/ccid2.c b/net/dccp/ccids/ccid2.c index 02d126d9a711..48eeb4494e8d 100644 --- a/net/dccp/ccids/ccid2.c +++ b/net/dccp/ccids/ccid2.c | |||
@@ -228,18 +228,10 @@ static void ccid2_hc_tx_packet_sent(struct sock *sk, int more, unsigned int len) | |||
228 | struct dccp_sock *dp = dccp_sk(sk); | 228 | struct dccp_sock *dp = dccp_sk(sk); |
229 | struct ccid2_hc_tx_sock *hctx = ccid2_hc_tx_sk(sk); | 229 | struct ccid2_hc_tx_sock *hctx = ccid2_hc_tx_sk(sk); |
230 | struct ccid2_seq *next; | 230 | struct ccid2_seq *next; |
231 | u64 seq; | ||
232 | 231 | ||
233 | hctx->ccid2hctx_pipe++; | 232 | hctx->ccid2hctx_pipe++; |
234 | 233 | ||
235 | /* There is an issue. What if another packet is sent between | 234 | hctx->ccid2hctx_seqh->ccid2s_seq = dp->dccps_gss; |
236 | * packet_send() and packet_sent(). Then the sequence number would be | ||
237 | * wrong. | ||
238 | * -sorbo. | ||
239 | */ | ||
240 | seq = dp->dccps_gss; | ||
241 | |||
242 | hctx->ccid2hctx_seqh->ccid2s_seq = seq; | ||
243 | hctx->ccid2hctx_seqh->ccid2s_acked = 0; | 235 | hctx->ccid2hctx_seqh->ccid2s_acked = 0; |
244 | hctx->ccid2hctx_seqh->ccid2s_sent = jiffies; | 236 | hctx->ccid2hctx_seqh->ccid2s_sent = jiffies; |
245 | 237 | ||
@@ -313,7 +305,6 @@ static void ccid2_hc_tx_packet_sent(struct sock *sk, int more, unsigned int len) | |||
313 | ccid2_start_rto_timer(sk); | 305 | ccid2_start_rto_timer(sk); |
314 | 306 | ||
315 | #ifdef CONFIG_IP_DCCP_CCID2_DEBUG | 307 | #ifdef CONFIG_IP_DCCP_CCID2_DEBUG |
316 | ccid2_pr_debug("Sent: seq=%llu\n", (unsigned long long)seq); | ||
317 | do { | 308 | do { |
318 | struct ccid2_seq *seqp = hctx->ccid2hctx_seqt; | 309 | struct ccid2_seq *seqp = hctx->ccid2hctx_seqt; |
319 | 310 | ||