diff options
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-merge.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/block/blk-merge.c b/block/blk-merge.c index 7225511cf0b4..b8f1eaeeaac2 100644 --- a/block/blk-merge.c +++ b/block/blk-merge.c @@ -296,13 +296,7 @@ void blk_recalc_rq_segments(struct request *rq) void blk_recount_segments(struct request_queue *q, struct bio *bio) { - unsigned short seg_cnt; - - /* estimate segment number by bi_vcnt for non-cloned bio */ - if (bio_flagged(bio, BIO_CLONED)) - seg_cnt = bio_segments(bio); - else - seg_cnt = bio->bi_vcnt; + unsigned short seg_cnt = bio_segments(bio); if (test_bit(QUEUE_FLAG_NO_SG_MERGE, &q->queue_flags) && (seg_cnt < queue_max_segments(q))) |