OSDN Git Service

Revert "usb: dwc3: turn off VBUS when leaving host mode"
[sagit-ice-cold/kernel_xiaomi_msm8998.git] / block / blk-merge.c
index 7e79974..fc99936 100644 (file)
@@ -298,13 +298,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)))