Preparing for supporting multi-page bvec.
Reviewed-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
 {
        blk_status_t ret = 0;
        struct bio_vec *bvec = bio_last_bvec_all(bio);
-       struct page *page = bvec->bv_page;
+       struct bio_vec bv;
        struct extent_io_tree *tree = bio->bi_private;
        u64 start;
 
-       start = page_offset(page) + bvec->bv_offset;
+       mp_bvec_last_segment(bvec, &bv);
+       start = page_offset(bv.bv_page) + bv.bv_offset;
 
        bio->bi_private = NULL;