aboutsummaryrefslogtreecommitdiffstats
path: root/block/ll_rw_blk.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/ll_rw_blk.c')
-rw-r--r--block/ll_rw_blk.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
index c99b46354859..ef42bb2b12b6 100644
--- a/block/ll_rw_blk.c
+++ b/block/ll_rw_blk.c
@@ -527,8 +527,6 @@ int blk_do_ordered(request_queue_t *q, struct request **rqp)
527static int flush_dry_bio_endio(struct bio *bio, unsigned int bytes, int error) 527static int flush_dry_bio_endio(struct bio *bio, unsigned int bytes, int error)
528{ 528{
529 request_queue_t *q = bio->bi_private; 529 request_queue_t *q = bio->bi_private;
530 struct bio_vec *bvec;
531 int i;
532 530
533 /* 531 /*
534 * This is dry run, restore bio_sector and size. We'll finish 532 * This is dry run, restore bio_sector and size. We'll finish
@@ -540,13 +538,6 @@ static int flush_dry_bio_endio(struct bio *bio, unsigned int bytes, int error)
540 if (bio->bi_size) 538 if (bio->bi_size)
541 return 1; 539 return 1;
542 540
543 /* Rewind bvec's */
544 bio->bi_idx = 0;
545 bio_for_each_segment(bvec, bio, i) {
546 bvec->bv_len += bvec->bv_offset;
547 bvec->bv_offset = 0;
548 }
549
550 /* Reset bio */ 541 /* Reset bio */
551 set_bit(BIO_UPTODATE, &bio->bi_flags); 542 set_bit(BIO_UPTODATE, &bio->bi_flags);
552 bio->bi_size = q->bi_size; 543 bio->bi_size = q->bi_size;
@@ -1304,9 +1295,9 @@ static int blk_hw_contig_segment(request_queue_t *q, struct bio *bio,
1304 if (unlikely(!bio_flagged(nxt, BIO_SEG_VALID))) 1295 if (unlikely(!bio_flagged(nxt, BIO_SEG_VALID)))
1305 blk_recount_segments(q, nxt); 1296 blk_recount_segments(q, nxt);
1306 if (!BIOVEC_VIRT_MERGEABLE(__BVEC_END(bio), __BVEC_START(nxt)) || 1297 if (!BIOVEC_VIRT_MERGEABLE(__BVEC_END(bio), __BVEC_START(nxt)) ||
1307 BIOVEC_VIRT_OVERSIZE(bio->bi_hw_front_size + bio->bi_hw_back_size)) 1298 BIOVEC_VIRT_OVERSIZE(bio->bi_hw_back_size + nxt->bi_hw_front_size))
1308 return 0; 1299 return 0;
1309 if (bio->bi_size + nxt->bi_size > q->max_segment_size) 1300 if (bio->bi_hw_back_size + nxt->bi_hw_front_size > q->max_segment_size)
1310 return 0; 1301 return 0;
1311 1302
1312 return 1; 1303 return 1;