diff --git a/block/blk-merge.c b/block/blk-merge.c index 7efa8c3e2b727f6367af02e0afb201d938f74b65..1cd480ee2d77b05613df5a914ec5945be9c55c6c 100644 --- a/block/blk-merge.c +++ b/block/blk-merge.c @@ -288,6 +288,7 @@ static unsigned int __blk_recalc_rq_segments(struct request_queue *q, seg_size = bv.bv_len; } bbio = bio; + prev = 0; } if (nr_phys_segs == 1 && seg_size > fbio->bi_seg_front_size) @@ -603,7 +604,6 @@ static int ll_merge_requests_fn(struct request_queue *q, struct request *req, req->bio->bi_seg_front_size = seg_size; if (next->nr_phys_segments == 1) next->biotail->bi_seg_back_size = seg_size; - total_phys_segments--; } if (total_phys_segments > queue_max_segments(q))