diff options
Diffstat (limited to 'drivers/nvme/host/rdma.c')
| -rw-r--r-- | drivers/nvme/host/rdma.c | 8 | 
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c index 92a03ff5fb4d..4dbee893a047 100644 --- a/drivers/nvme/host/rdma.c +++ b/drivers/nvme/host/rdma.c @@ -571,6 +571,12 @@ static void nvme_rdma_free_queue(struct nvme_rdma_queue *queue)  	if (test_and_set_bit(NVME_RDMA_Q_DELETING, &queue->flags))  		return; +	if (nvme_rdma_queue_idx(queue) == 0) { +		nvme_rdma_free_qe(queue->device->dev, +			&queue->ctrl->async_event_sqe, +			sizeof(struct nvme_command), DMA_TO_DEVICE); +	} +  	nvme_rdma_destroy_queue_ib(queue);  	rdma_destroy_id(queue->cm_id);  } @@ -739,8 +745,6 @@ out:  static void nvme_rdma_destroy_admin_queue(struct nvme_rdma_ctrl *ctrl,  		bool remove)  { -	nvme_rdma_free_qe(ctrl->queues[0].device->dev, &ctrl->async_event_sqe, -			sizeof(struct nvme_command), DMA_TO_DEVICE);  	nvme_rdma_stop_queue(&ctrl->queues[0]);  	if (remove) {  		blk_cleanup_queue(ctrl->ctrl.admin_q);  | 
