瀏覽代碼

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>
Matthew Wilcox 13 年之前
父節點
當前提交
fe304c43c6
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/block/nvme.c

+ 1 - 0
drivers/block/nvme.c

@@ -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,