mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-18 12:56:18 +07:00
NVMe: Mark the end of the sg list
For user I/O and admin commands, we were forgetting to mark the end of the SG list. Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
This commit is contained in:
parent
497421880a
commit
fe304c43c6
@ -1045,6 +1045,7 @@ static struct nvme_iod *nvme_map_user_pages(struct nvme_dev *dev, int write,
|
|||||||
length -= (PAGE_SIZE - offset);
|
length -= (PAGE_SIZE - offset);
|
||||||
offset = 0;
|
offset = 0;
|
||||||
}
|
}
|
||||||
|
sg_mark_end(&sg[i - 1]);
|
||||||
|
|
||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
nents = dma_map_sg(&dev->pci_dev->dev, sg, count,
|
nents = dma_map_sg(&dev->pci_dev->dev, sg, count,
|
||||||
|
Loading…
Reference in New Issue
Block a user