diff options
-rw-r--r-- | block/blk-merge.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/block/blk-merge.c b/block/blk-merge.c index 888a7fec81f7..261353166dcf 100644 --- a/block/blk-merge.c +++ b/block/blk-merge.c | |||
@@ -304,7 +304,6 @@ static int blk_phys_contig_segment(struct request_queue *q, struct bio *bio, | |||
304 | struct bio *nxt) | 304 | struct bio *nxt) |
305 | { | 305 | { |
306 | struct bio_vec end_bv = { NULL }, nxt_bv; | 306 | struct bio_vec end_bv = { NULL }, nxt_bv; |
307 | struct bvec_iter iter; | ||
308 | 307 | ||
309 | if (!blk_queue_cluster(q)) | 308 | if (!blk_queue_cluster(q)) |
310 | return 0; | 309 | return 0; |
@@ -316,11 +315,8 @@ static int blk_phys_contig_segment(struct request_queue *q, struct bio *bio, | |||
316 | if (!bio_has_data(bio)) | 315 | if (!bio_has_data(bio)) |
317 | return 1; | 316 | return 1; |
318 | 317 | ||
319 | bio_for_each_segment(end_bv, bio, iter) | 318 | bio_get_last_bvec(bio, &end_bv); |
320 | if (end_bv.bv_len == iter.bi_size) | 319 | bio_get_first_bvec(nxt, &nxt_bv); |
321 | break; | ||
322 | |||
323 | nxt_bv = bio_iovec(nxt); | ||
324 | 320 | ||
325 | if (!BIOVEC_PHYS_MERGEABLE(&end_bv, &nxt_bv)) | 321 | if (!BIOVEC_PHYS_MERGEABLE(&end_bv, &nxt_bv)) |
326 | return 0; | 322 | return 0; |