From: Keith Busch Date: Tue, 1 Sep 2015 16:46:44 +0000 (-0600) Subject: blk: Fix bio_io_vec index when checking bvec gaps X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2ca495ac27d245513c11fed70591b1838250e240;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 --- 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,