提交 51882d00 编写于 作者: M Matthew Wilcox

NVMe: Advance the sg pointer when filling in an sg list

For multipage BIOs, we were always using sg[0] instead of advancing
through the list.  Oops :-)
Signed-off-by: NMatthew Wilcox <matthew.r.wilcox@intel.com>
上级 d2d87034
......@@ -321,6 +321,7 @@ static int nvme_map_bio(struct device *dev, struct nvme_req_info *info,
sg_init_table(sg, psegs);
bio_for_each_segment(bvec, bio, i) {
sg_set_page(sg, bvec->bv_page, bvec->bv_len, bvec->bv_offset);
sg++;
/* XXX: handle non-mergable here */
nsegs++;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册