diff --git a/lib/nvmf/rdma.c b/lib/nvmf/rdma.c index e620d346ef..960203d894 100644 --- a/lib/nvmf/rdma.c +++ b/lib/nvmf/rdma.c @@ -1550,6 +1550,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); } rdma_req->state = RDMA_REQUEST_STATE_COMPLETED; }