diff options
author | Matthew Wilcox <matthew.r.wilcox@intel.com> | 2012-01-06 15:49:25 -0500 |
---|---|---|
committer | Matthew Wilcox <matthew.r.wilcox@intel.com> | 2012-01-10 14:54:14 -0500 |
commit | fe304c43c6d63e29ed4fc46a874d7a74313788c5 (patch) | |
tree | dbc3cc55c09bdcff5b503915d86049b20c9911e7 /drivers/block/nvme.c | |
parent | 497421880acecd0281d3182d534f3d28c927caec (diff) |
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>
Diffstat (limited to 'drivers/block/nvme.c')
-rw-r--r-- | drivers/block/nvme.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/block/nvme.c b/drivers/block/nvme.c index 3f8cae9dc960..71fc9030b4df 100644 --- a/drivers/block/nvme.c +++ b/drivers/block/nvme.c | |||
@@ -1045,6 +1045,7 @@ static struct nvme_iod *nvme_map_user_pages(struct nvme_dev *dev, int write, | |||
1045 | length -= (PAGE_SIZE - offset); | 1045 | length -= (PAGE_SIZE - offset); |
1046 | offset = 0; | 1046 | offset = 0; |
1047 | } | 1047 | } |
1048 | sg_mark_end(&sg[i - 1]); | ||
1048 | 1049 | ||
1049 | err = -ENOMEM; | 1050 | err = -ENOMEM; |
1050 | nents = dma_map_sg(&dev->pci_dev->dev, sg, count, | 1051 | nents = dma_map_sg(&dev->pci_dev->dev, sg, count, |