From: Keith Busch <kbusch@xxxxxxxxxx> If a bio is merged to a req, the entire bio list is merged, so don't temporarily unchain it when counting segments for consideration. Signed-off-by: Keith Busch <kbusch@xxxxxxxxxx> --- block/blk-integrity.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/block/blk-integrity.c b/block/blk-integrity.c index f9367f3a04208..985de64409cf5 100644 --- a/block/blk-integrity.c +++ b/block/blk-integrity.c @@ -92,7 +92,6 @@ bool blk_integrity_merge_bio(struct request_queue *q, struct request *req, struct bio *bio) { int nr_integrity_segs; - struct bio *next = bio->bi_next; if (blk_integrity_rq(req) == 0 && bio_integrity(bio) == NULL) return true; @@ -103,10 +102,7 @@ bool blk_integrity_merge_bio(struct request_queue *q, struct request *req, if (bio_integrity(req->bio)->bip_flags != bio_integrity(bio)->bip_flags) return false; - bio->bi_next = NULL; nr_integrity_segs = blk_rq_count_integrity_segs(bio); - bio->bi_next = next; - if (req->nr_integrity_segments + nr_integrity_segs > q->limits.max_integrity_segments) return false; -- 2.43.5