aboutsummaryrefslogtreecommitdiffstats
path: root/net/rds/recv.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/rds/recv.c')
-rw-r--r--net/rds/recv.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/rds/recv.c b/net/rds/recv.c
index fdff33c7b432..e2a2b9344f7b 100644
--- a/net/rds/recv.c
+++ b/net/rds/recv.c
@@ -31,6 +31,7 @@
31 * 31 *
32 */ 32 */
33#include <linux/kernel.h> 33#include <linux/kernel.h>
34#include <linux/slab.h>
34#include <net/sock.h> 35#include <net/sock.h>
35#include <linux/in.h> 36#include <linux/in.h>
36 37
@@ -195,8 +196,8 @@ void rds_recv_incoming(struct rds_connection *conn, __be32 saddr, __be32 daddr,
195 * XXX we could spend more on the wire to get more robust failure 196 * XXX we could spend more on the wire to get more robust failure
196 * detection, arguably worth it to avoid data corruption. 197 * detection, arguably worth it to avoid data corruption.
197 */ 198 */
198 if (be64_to_cpu(inc->i_hdr.h_sequence) < conn->c_next_rx_seq 199 if (be64_to_cpu(inc->i_hdr.h_sequence) < conn->c_next_rx_seq &&
199 && (inc->i_hdr.h_flags & RDS_FLAG_RETRANSMITTED)) { 200 (inc->i_hdr.h_flags & RDS_FLAG_RETRANSMITTED)) {
200 rds_stats_inc(s_recv_drop_old_seq); 201 rds_stats_inc(s_recv_drop_old_seq);
201 goto out; 202 goto out;
202 } 203 }
@@ -432,10 +433,9 @@ int rds_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg,
432 } 433 }
433 434
434 timeo = wait_event_interruptible_timeout(*sk->sk_sleep, 435 timeo = wait_event_interruptible_timeout(*sk->sk_sleep,
435 (!list_empty(&rs->rs_notify_queue) 436 (!list_empty(&rs->rs_notify_queue) ||
436 || rs->rs_cong_notify 437 rs->rs_cong_notify ||
437 || rds_next_incoming(rs, &inc)), 438 rds_next_incoming(rs, &inc)), timeo);
438 timeo);
439 rdsdebug("recvmsg woke inc %p timeo %ld\n", inc, 439 rdsdebug("recvmsg woke inc %p timeo %ld\n", inc,
440 timeo); 440 timeo);
441 if (timeo > 0 || timeo == MAX_SCHEDULE_TIMEOUT) 441 if (timeo > 0 || timeo == MAX_SCHEDULE_TIMEOUT)