diff --git a/lib/nvmf/rdma.c b/lib/nvmf/rdma.c index 219e333cac..3d2edbf7ea 100644 --- a/lib/nvmf/rdma.c +++ b/lib/nvmf/rdma.c @@ -1449,6 +1449,10 @@ spdk_nvmf_rdma_request_process(struct spdk_nvmf_rdma_transport *rtransport, if (rqpair->ibv_attr.qp_state == IBV_QPS_ERR || rqpair->qpair.state != SPDK_NVMF_QPAIR_ACTIVE) { if (rdma_req->state == RDMA_REQUEST_STATE_NEED_BUFFER) { TAILQ_REMOVE(&rgroup->pending_data_buf_queue, rdma_req, link); + } else if (rdma_req->state == RDMA_REQUEST_STATE_DATA_TRANSFER_TO_CONTROLLER_PENDING) { + STAILQ_REMOVE(&rqpair->pending_rdma_read_queue, rdma_req, spdk_nvmf_rdma_request, state_link); + } else if (rdma_req->state == RDMA_REQUEST_STATE_DATA_TRANSFER_TO_HOST_PENDING) { + STAILQ_REMOVE(&rqpair->pending_rdma_write_queue, rdma_req, spdk_nvmf_rdma_request, state_link); } spdk_nvmf_rdma_request_set_state(rdma_req, RDMA_REQUEST_STATE_COMPLETED); }