Skip to content

Commit

Permalink
NVMe: Advance the sg pointer when filling in an sg list
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Matthew Wilcox committed Nov 4, 2011
1 parent d2d8703 commit 51882d0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/block/nvme.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
}
Expand Down

0 comments on commit 51882d0

Please sign in to comment.