Commit d20be90a authored by Matias Bjørling's avatar Matias Bjørling Committed by Jens Axboe

lightnvm: pblk: remove size and out of bounds read check

The I/O size and capacity checks are already done by the block layer.
Signed-off-by: default avatarMatias Bjørling <mb@lightnvm.io>
Reviewed-by: default avatarJavier González <javier@cnexlabs.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 8bbd45d0
...@@ -449,13 +449,6 @@ int pblk_submit_read(struct pblk *pblk, struct bio *bio) ...@@ -449,13 +449,6 @@ int pblk_submit_read(struct pblk *pblk, struct bio *bio)
DECLARE_BITMAP(read_bitmap, NVM_MAX_VLBA); DECLARE_BITMAP(read_bitmap, NVM_MAX_VLBA);
int ret = NVM_IO_ERR; int ret = NVM_IO_ERR;
/* logic error: lba out-of-bounds. Ignore read request */
if (blba >= pblk->rl.nr_secs || nr_secs > NVM_MAX_VLBA) {
WARN(1, "pblk: read lba out of bounds (lba:%llu, nr:%d)\n",
(unsigned long long)blba, nr_secs);
return NVM_IO_ERR;
}
generic_start_io_acct(q, REQ_OP_READ, bio_sectors(bio), generic_start_io_acct(q, REQ_OP_READ, bio_sectors(bio),
&pblk->disk->part0); &pblk->disk->part0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment