diff options
Diffstat (limited to 'block/bio.c')
-rw-r--r-- | block/bio.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/block/bio.c b/block/bio.c index fa01bef35bb1..1f2cc1fbe283 100644 --- a/block/bio.c +++ b/block/bio.c @@ -608,13 +608,13 @@ void bio_truncate(struct bio *bio, unsigned new_size) void guard_bio_eod(struct bio *bio) { sector_t maxsector; - struct hd_struct *part; + struct block_device *part; rcu_read_lock(); part = __disk_get_part(bio->bi_disk, bio->bi_partno); if (part) - maxsector = part_nr_sects_read(part); - else + maxsector = bdev_nr_sectors(part); + else maxsector = get_capacity(bio->bi_disk); rcu_read_unlock(); @@ -1212,8 +1212,8 @@ void bio_copy_data_iter(struct bio *dst, struct bvec_iter *dst_iter, flush_dcache_page(dst_bv.bv_page); - bio_advance_iter(src, src_iter, bytes); - bio_advance_iter(dst, dst_iter, bytes); + bio_advance_iter_single(src, src_iter, bytes); + bio_advance_iter_single(dst, dst_iter, bytes); } } EXPORT_SYMBOL(bio_copy_data_iter); |