summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMing Lei <tom.leiming@gmail.com>2016-11-11 15:05:31 +0300
committerJens Axboe <axboe@fb.com>2016-11-22 18:57:55 +0300
commit2c73a603cd0722c0594afc9efa0a617204303348 (patch)
tree2faa31860fb320a0141cc472f941ea7a637ba1fe /drivers
parent06efffda51d9785ea765b42ad25bd65405facf12 (diff)
downloadlinux-2c73a603cd0722c0594afc9efa0a617204303348.tar.xz
block: floppy: use bio_add_page()
Signed-off-by: Ming Lei <tom.leiming@gmail.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/floppy.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
index 6a3ff2b2e3ae..a391a3cfb3fe 100644
--- a/drivers/block/floppy.c
+++ b/drivers/block/floppy.c
@@ -3807,12 +3807,9 @@ static int __floppy_read_block_0(struct block_device *bdev, int drive)
cbdata.drive = drive;
bio_init(&bio, &bio_vec, 1);
- bio_vec.bv_page = page;
- bio_vec.bv_len = size;
- bio_vec.bv_offset = 0;
- bio.bi_vcnt = 1;
- bio.bi_iter.bi_size = size;
bio.bi_bdev = bdev;
+ bio_add_page(&bio, page, size, 0);
+
bio.bi_iter.bi_sector = 0;
bio.bi_flags |= (1 << BIO_QUIET);
bio.bi_private = &cbdata;