From: Matthew Wilcox Date: Thu, 10 Feb 2011 13:49:59 +0000 (-0500) Subject: NVMe: Advance the sg pointer when filling in an sg list X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=51882d00f07da9601cc962a3596e48aafb4f4163;p=~shefty%2Frdma-dev.git 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: Matthew Wilcox --- diff --git a/drivers/block/nvme.c b/drivers/block/nvme.c index 71bdf6f2c93..903e7f15b60 100644 --- a/drivers/block/nvme.c +++ b/drivers/block/nvme.c @@ -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++; }