Skip to content

Commit

Permalink
NVMe: Mark the end of the sg list
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Matthew Wilcox committed Jan 10, 2012
1 parent 4974218 commit fe304c4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/block/nvme.c
Original file line number Diff line number Diff line change
Expand Up @@ -1045,6 +1045,7 @@ static struct nvme_iod *nvme_map_user_pages(struct nvme_dev *dev, int write,
length -= (PAGE_SIZE - offset);
offset = 0;
}
sg_mark_end(&sg[i - 1]);

err = -ENOMEM;
nents = dma_map_sg(&dev->pci_dev->dev, sg, count,
Expand Down

0 comments on commit fe304c4

Please sign in to comment.