NVMe: Advance the sg pointer when filling in an sg list
authorMatthew Wilcox <matthew.r.wilcox@intel.com>
Thu, 10 Feb 2011 13:49:59 +0000 (08:49 -0500)
committerMatthew Wilcox <matthew.r.wilcox@intel.com>
Fri, 4 Nov 2011 19:52:56 +0000 (15:52 -0400)
For multipage BIOs, we were always using sg[0] instead of advancing
through the list.  Oops :-)

Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
drivers/block/nvme.c

index 71bdf6f..903e7f1 100644 (file)
@@ -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++;
        }