From: Chris Mason Date: Fri, 3 Feb 2012 16:09:07 +0000 (-0500) Subject: RDS: Don't destroy the rdma id until after we're dong using it X-Git-Tag: v4.1.12-92~319^2^2~2^2~38 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=930b6e289b63ca5fed825c63281fc354e72633ce;p=users%2Fjedix%2Flinux-maple.git RDS: Don't destroy the rdma id until after we're dong using it During connection resets, we are destroying the rdma id too soon. This moves it to after we clear the rings Signed-off-by: Chris Mason Signed-off-by: Bang Nguyen --- diff --git a/net/rds/ib_cm.c b/net/rds/ib_cm.c index 3c60740fd18e..cdd30c19454d 100644 --- a/net/rds/ib_cm.c +++ b/net/rds/ib_cm.c @@ -780,7 +780,6 @@ void rds_ib_conn_shutdown(struct rds_connection *conn) ib_destroy_cq(ic->i_rcq); if (ic->i_scq) ib_destroy_cq(ic->i_scq); - rdma_destroy_id(ic->i_cm_id); /* then free the resources that ib callbacks use */ if (ic->i_send_hdrs) @@ -806,6 +805,8 @@ void rds_ib_conn_shutdown(struct rds_connection *conn) if (ic->i_recvs) rds_ib_recv_clear_ring(ic); + rdma_destroy_id(ic->i_cm_id); + /* * Move connection back to the nodev list. */