Skip to content

Commit b8f6446

Browse files
Ming Leikeithbusch
authored andcommitted
nvme-pci: fix DMA direction of unmapping integrity data
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]>
1 parent ac522fc commit b8f6446

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/nvme/host/pci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -967,7 +967,7 @@ static __always_inline void nvme_pci_unmap_rq(struct request *req)
967967
struct nvme_iod *iod = blk_mq_rq_to_pdu(req);
968968

969969
dma_unmap_page(dev->dev, iod->meta_dma,
970-
rq_integrity_vec(req)->bv_len, rq_data_dir(req));
970+
rq_integrity_vec(req)->bv_len, rq_dma_dir(req));
971971
}
972972

973973
if (blk_rq_nr_phys_segments(req))

0 commit comments

Comments
 (0)