diff options
author | zhenwei pi <pizhenwei@bytedance.com> | 2023-04-07 11:15:57 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2023-04-13 08:59:05 +0200 |
commit | 015ad2b1e4b9e04628b459ad8d5324673f6cbc9f (patch) | |
tree | c04149edd4b120e60d625fd8560b710029dbc569 /block | |
parent | nvme: fix double blk_mq_complete_request for timeout request with low probabi... (diff) | |
download | linux-015ad2b1e4b9e04628b459ad8d5324673f6cbc9f.tar.xz linux-015ad2b1e4b9e04628b459ad8d5324673f6cbc9f.zip |
nvme-rdma: minor cleanup in nvme_rdma_create_cq()
Before cleanup:
enum ib_poll_context poll_ctx;
if (nvme_rdma_poll_queue(queue)) {
poll_ctx = IB_POLL_DIRECT;
queue->ib_cq = ib_alloc_cq(ibdev, queue, queue->cq_size,
comp_vector, poll_ctx);
} else {
poll_ctx = IB_POLL_SOFTIRQ;
queue->ib_cq = ib_cq_pool_get(ibdev, queue->cq_size,
comp_vector, poll_ctx);
}
After cleanup:
if (nvme_rdma_poll_queue(queue))
queue->ib_cq = ib_alloc_cq(ibdev, queue, queue->cq_size,
comp_vector, IB_POLL_DIRECT);
else
queue->ib_cq = ib_cq_pool_get(ibdev, queue->cq_size,
comp_vector, IB_POLL_SOFTIRQ);
IB_POLL_SOFTIRQ/IB_POLL_SOFTIRQ gets used directly in function, this
seems more accessible.
Signed-off-by: zhenwei pi <pizhenwei@bytedance.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'block')
0 files changed, 0 insertions, 0 deletions