summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeith Busch <keith.busch@intel.com>2015-09-01 10:46:44 -0600
committerJens Axboe <axboe@fb.com>2015-09-01 11:04:58 -0600
commit2ca495ac27d245513c11fed70591b1838250e240 (patch)
tree598b81a12507097dc1429dc92f1e3d59f5a6e119
parent03100aada96f0645bbcb89aea24c01f02d0ef1fa (diff)
downloadlinux-2ca495ac27d245513c11fed70591b1838250e240.tar.gz
linux-2ca495ac27d245513c11fed70591b1838250e240.tar.bz2
linux-2ca495ac27d245513c11fed70591b1838250e240.zip
blk: Fix bio_io_vec index when checking bvec gaps
Corrects a coding error from earlier patch. Reported by: Sagi Grimberg <sagig@dev.mellanox.co.il> Signed-off-by: Keith Busch <keith.busch@intel.com> Fixes: 03100aada96f ("block: Replace SG_GAPS with new queue limits mask") Signed-off-by: Jens Axboe <axboe@fb.com>
-rw-r--r--block/blk-merge.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-merge.c b/block/blk-merge.c
index 0e0d9fd01c40..b2625271a572 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -488,7 +488,7 @@ static int req_gap_to_prev(struct request *req, struct bio *next)
struct bio *prev = req->biotail;
return bvec_gap_to_prev(req->q, &prev->bi_io_vec[prev->bi_vcnt - 1],
- next->bi_io_vec[1].bv_offset);
+ next->bi_io_vec[0].bv_offset);
}
static int ll_merge_requests_fn(struct request_queue *q, struct request *req,