Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2c73a603 authored by Ming Lei's avatar Ming Lei Committed by Jens Axboe
Browse files

block: floppy: use bio_add_page()



Signed-off-by: default avatarMing Lei <tom.leiming@gmail.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent 06efffda
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -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;