mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
nvme-rdma: use blk_rq_payload_bytes instead of blk_rq_bytes
blk_rq_bytes does the wrong thing for special payloads like discards and might cause the driver to not set up a SGL. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Signed-off-by: Keith Busch <[email protected]>
This commit is contained in:
parent
5a1e595333
commit
0d30992395
1 changed files with 2 additions and 2 deletions
|
|
@ -1051,7 +1051,7 @@ static void nvme_rdma_unmap_data(struct nvme_rdma_queue *queue,
|
|||
struct nvme_rdma_device *dev = queue->device;
|
||||
struct ib_device *ibdev = dev->dev;
|
||||
|
||||
if (!blk_rq_bytes(rq))
|
||||
if (!blk_rq_payload_bytes(rq))
|
||||
return;
|
||||
|
||||
if (req->mr) {
|
||||
|
|
@ -1166,7 +1166,7 @@ static int nvme_rdma_map_data(struct nvme_rdma_queue *queue,
|
|||
|
||||
c->common.flags |= NVME_CMD_SGL_METABUF;
|
||||
|
||||
if (!blk_rq_bytes(rq))
|
||||
if (!blk_rq_payload_bytes(rq))
|
||||
return nvme_rdma_set_sg_null(c);
|
||||
|
||||
req->sg_table.sgl = req->first_sgl;
|
||||
|
|
|
|||
Loading…
Reference in a new issue