Skip to content
Snippets Groups Projects
Commit 74cb8994 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe
Browse files

brd: remove the end of device check in brd_do_bvec


The block layer already checks for this conditions in bio_check_eod
before calling the driver.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Acked-by: default avatarTejun Heo <tj@kernel.org>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent d11cd289
No related branches found
No related tags found
No related merge requests found
......@@ -285,14 +285,10 @@ out:
static blk_qc_t brd_submit_bio(struct bio *bio)
{
struct brd_device *brd = bio->bi_disk->private_data;
sector_t sector = bio->bi_iter.bi_sector;
struct bio_vec bvec;
sector_t sector;
struct bvec_iter iter;
sector = bio->bi_iter.bi_sector;
if (bio_end_sector(bio) > get_capacity(bio->bi_disk))
goto io_error;
bio_for_each_segment(bvec, bio, iter) {
unsigned int len = bvec.bv_len;
int err;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment