nvmf: Fix the bug when destroy rdma queue pair.
We probably do not allocate the mgmt_channel when we destroy the rdma queue pair, add the judgment before put the io channnel. Change-Id: I528c9686907c04c5025ff9d3872f24f2996e9d33 Signed-off-by: Cunyin Chang <cunyin.chang@intel.com> Reviewed-on: https://review.gerrithub.io/388159 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
d244764809
commit
5de74d085d
@ -318,7 +318,10 @@ spdk_nvmf_rdma_qpair_destroy(struct spdk_nvmf_rdma_qpair *rdma_qpair)
|
|||||||
ibv_destroy_cq(rdma_qpair->cq);
|
ibv_destroy_cq(rdma_qpair->cq);
|
||||||
}
|
}
|
||||||
|
|
||||||
spdk_put_io_channel(rdma_qpair->mgmt_channel);
|
if (rdma_qpair->mgmt_channel) {
|
||||||
|
spdk_put_io_channel(rdma_qpair->mgmt_channel);
|
||||||
|
}
|
||||||
|
|
||||||
/* Free all memory */
|
/* Free all memory */
|
||||||
spdk_dma_free(rdma_qpair->cmds);
|
spdk_dma_free(rdma_qpair->cmds);
|
||||||
spdk_dma_free(rdma_qpair->cpls);
|
spdk_dma_free(rdma_qpair->cpls);
|
||||||
|
Loading…
Reference in New Issue
Block a user