From 996705f1b8959e5b07d14350aa4c3523f4a1b866 Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Mon, 27 Jun 2016 14:29:40 -0700 Subject: [PATCH] nvmf: do not dealloc tx_desc in RDMA error cases The connection will be closed in these cases anyway, so just let the normal connection cleanup deal with the active tx_desc. Change-Id: I96c68d5802e189bb82b180cc3c7d7c3f4135be1f Signed-off-by: Daniel Verkamp --- lib/nvmf/rdma.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/nvmf/rdma.c b/lib/nvmf/rdma.c index 3326f333d..36cddcbec 100644 --- a/lib/nvmf/rdma.c +++ b/lib/nvmf/rdma.c @@ -428,7 +428,6 @@ nvmf_post_rdma_send(struct spdk_nvmf_conn *conn, int spdk_nvmf_rdma_request_complete(struct spdk_nvmf_conn *conn, struct spdk_nvmf_request *req) { - struct nvme_qp_tx_desc *tx_desc = req->tx_desc; struct spdk_nvme_cpl *rsp = &req->rsp->nvme_cpl; int ret; @@ -439,21 +438,17 @@ spdk_nvmf_rdma_request_complete(struct spdk_nvmf_conn *conn, struct spdk_nvmf_re ret = nvmf_post_rdma_write(conn, req); if (ret) { SPDK_ERRLOG("Unable to post rdma write tx descriptor\n"); - goto command_fail; + return -1; } } ret = nvmf_post_rdma_send(conn, req); if (ret) { SPDK_ERRLOG("Unable to send response capsule\n"); - goto command_fail; + return -1; } return 0; - -command_fail: - nvmf_deactive_tx_desc(tx_desc); - return -1; } static int @@ -1245,7 +1240,6 @@ nvmf_check_rdma_completions(struct spdk_nvmf_conn *conn) rc = spdk_nvmf_request_exec(req); if (rc) { SPDK_ERRLOG("request_exec error %d after RDMA Read completion\n", rc); - nvmf_deactive_tx_desc(tx_desc); return -1; }