block: Abstract out bvec iterator
[sfrench/cifs-2.6.git] / drivers / md / bcache / util.c
index 462214eeacbedbd9548e725be2e625723cda0d7e..c57621e49dc002c7b94b7bf34f2a1aa06a3f1b46 100644 (file)
@@ -218,10 +218,10 @@ uint64_t bch_next_delay(struct bch_ratelimit *d, uint64_t done)
 
 void bch_bio_map(struct bio *bio, void *base)
 {
-       size_t size = bio->bi_size;
+       size_t size = bio->bi_iter.bi_size;
        struct bio_vec *bv = bio->bi_io_vec;
 
-       BUG_ON(!bio->bi_size);
+       BUG_ON(!bio->bi_iter.bi_size);
        BUG_ON(bio->bi_vcnt);
 
        bv->bv_offset = base ? ((unsigned long) base) % PAGE_SIZE : 0;