nvmet: use bio_io_error instead of duplicating it

This commit doesn't change any logic.

Signed-off-by: Israel Rukshin <israelr@mellanox.com>
Reviewed-by: Max Gurtovoy <maxg@mellanox.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Israel Rukshin 2019-10-13 19:57:32 +03:00 committed by Jens Axboe
parent 58a8df67e0
commit 4d764bb9a9
1 changed files with 3 additions and 5 deletions

View File

@ -261,12 +261,10 @@ static void nvmet_bdev_execute_discard(struct nvmet_req *req)
if (bio) {
bio->bi_private = req;
bio->bi_end_io = nvmet_bio_done;
if (status) {
bio->bi_status = BLK_STS_IOERR;
bio_endio(bio);
} else {
if (status)
bio_io_error(bio);
else
submit_bio(bio);
}
} else {
nvmet_req_complete(req, status);
}