From 3ef16653d178a7ca4b797eab1d0379470cfb2872 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 6 Jul 2010 15:04:34 -0700 Subject: [PATCH] --- yaml --- r: 214457 b: refs/heads/master c: d455ab64096b9a86849c7315c53e595330842db6 h: refs/heads/master i: 214455: b35341a72ec7469c3262b36ed055c041bdc291d0 v: v3 --- [refs] | 2 +- trunk/net/rds/ib_recv.c | 20 ++++++++++++-------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index 03ec7495b7a1..7fb850cf851e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 80c51be56ffa257d3177f0d750d90be65d30c22f +refs/heads/master: d455ab64096b9a86849c7315c53e595330842db6 diff --git a/trunk/net/rds/ib_recv.c b/trunk/net/rds/ib_recv.c index c8c60981cf2e..9c4208f6b451 100644 --- a/trunk/net/rds/ib_recv.c +++ b/trunk/net/rds/ib_recv.c @@ -979,18 +979,22 @@ static inline void rds_poll_cq(struct rds_ib_connection *ic, * to get a recv completion _before_ the rdmacm ESTABLISHED * event is processed. */ - if (rds_conn_up(conn) || rds_conn_connecting(conn)) { + if (wc.status == IB_WC_SUCCESS) { + rds_ib_process_recv(conn, recv, wc.byte_len, state); + } else { /* We expect errors as the qp is drained during shutdown */ - if (wc.status == IB_WC_SUCCESS) { - rds_ib_process_recv(conn, recv, wc.byte_len, state); - } else { + if (rds_conn_up(conn) || rds_conn_connecting(conn)) rds_ib_conn_error(conn, "recv completion on " - "%pI4 had status %u, disconnecting and " - "reconnecting\n", &conn->c_faddr, - wc.status); - } + "%pI4 had status %u, disconnecting and " + "reconnecting\n", &conn->c_faddr, + wc.status); } + /* + * It's very important that we only free this ring entry if we've truly + * freed the resources allocated to the entry. The refilling path can + * leak if we don't. + */ rds_ib_ring_free(&ic->i_recv_ring, 1); } }