summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wilcox <matthew.r.wilcox@intel.com>2011-02-10 14:49:59 +0100
committerMatthew Wilcox <matthew.r.wilcox@intel.com>2011-11-04 20:52:56 +0100
commit51882d00f07da9601cc962a3596e48aafb4f4163 (patch)
treedad2569435369862ed2c5541810d41fc5e844b90
parentNVMe: Renumber the special context values (diff)
downloadlinux-51882d00f07da9601cc962a3596e48aafb4f4163.tar.xz
linux-51882d00f07da9601cc962a3596e48aafb4f4163.zip
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 <matthew.r.wilcox@intel.com>
-rw-r--r--drivers/block/nvme.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/block/nvme.c b/drivers/block/nvme.c
index 71bdf6f2c93b..903e7f15b60d 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++;
}