Skip to content
/ linux Public
forked from torvalds/linux

Commit

Permalink
nvme-pci: fix DMA direction of unmapping integrity data
Browse files Browse the repository at this point in the history
DMA direction should be taken in dma_unmap_page() for unmapping integrity
data.

Fix this DMA direction, and reported in Guangwu's test.

Reported-by: Guangwu Zhang <[email protected]>
Fixes: 4aedb70 ("nvme-pci: split metadata handling from nvme_map_data / nvme_unmap_data")
Signed-off-by: Ming Lei <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Signed-off-by: Keith Busch <[email protected]>
  • Loading branch information
Ming Lei authored and keithbusch committed Jul 13, 2023
1 parent ac522fc commit b8f6446
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/nvme/host/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -967,7 +967,7 @@ static __always_inline void nvme_pci_unmap_rq(struct request *req)
struct nvme_iod *iod = blk_mq_rq_to_pdu(req);

dma_unmap_page(dev->dev, iod->meta_dma,
rq_integrity_vec(req)->bv_len, rq_data_dir(req));
rq_integrity_vec(req)->bv_len, rq_dma_dir(req));
}

if (blk_rq_nr_phys_segments(req))
Expand Down

0 comments on commit b8f6446

Please sign in to comment.