From 930b6e289b63ca5fed825c63281fc354e72633ce Mon Sep 17 00:00:00 2001 From: Chris Mason Date: Fri, 3 Feb 2012 11:09:07 -0500 Subject: [PATCH] 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 --- net/rds/ib_cm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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. */ -- 2.50.1