Commit 4d764bb9 authored by Israel Rukshin's avatar Israel Rukshin Committed by Jens Axboe

nvmet: use bio_io_error instead of duplicating it

This commit doesn't change any logic.
Signed-off-by: default avatarIsrael Rukshin <israelr@mellanox.com>
Reviewed-by: default avatarMax Gurtovoy <maxg@mellanox.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarKeith Busch <kbusch@kernel.org>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 58a8df67
...@@ -261,12 +261,10 @@ static void nvmet_bdev_execute_discard(struct nvmet_req *req) ...@@ -261,12 +261,10 @@ static void nvmet_bdev_execute_discard(struct nvmet_req *req)
if (bio) { if (bio) {
bio->bi_private = req; bio->bi_private = req;
bio->bi_end_io = nvmet_bio_done; bio->bi_end_io = nvmet_bio_done;
if (status) { if (status)
bio->bi_status = BLK_STS_IOERR; bio_io_error(bio);
bio_endio(bio); else
} else {
submit_bio(bio); submit_bio(bio);
}
} else { } else {
nvmet_req_complete(req, status); nvmet_req_complete(req, status);
} }
......
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