From 2ca495ac27d245513c11fed70591b1838250e240 Mon Sep 17 00:00:00 2001 From: Keith Busch Date: Tue, 1 Sep 2015 10:46:44 -0600 Subject: blk: Fix bio_io_vec index when checking bvec gaps Corrects a coding error from earlier patch. Reported by: Sagi Grimberg Signed-off-by: Keith Busch Fixes: 03100aada96f ("block: Replace SG_GAPS with new queue limits mask") Signed-off-by: Jens Axboe --- block/blk-merge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'block') 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, -- cgit v1.2.3-58-ga151