Commit 35ed78b3 authored by Guoqing Jiang's avatar Guoqing Jiang Committed by Jens Axboe

block: use bio_{wouldblock,io}_error in direct_make_request

Use the two functions to simplify code.
Signed-off-by: default avatarGuoqing Jiang <guoqing.jiang@cloud.ionos.com>
Reviewed-by: default avatarNikolay Borisov <nborisov@suse.com>
Reviewed-by: default avatarBart Van Assche <bvanassche@acm.org>
Reviewed-by: default avatarChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 0d720318
......@@ -1121,10 +1121,9 @@ blk_qc_t direct_make_request(struct bio *bio)
if (unlikely(blk_queue_enter(q, nowait ? BLK_MQ_REQ_NOWAIT : 0))) {
if (nowait && !blk_queue_dying(q))
bio->bi_status = BLK_STS_AGAIN;
bio_wouldblock_error(bio);
else
bio->bi_status = BLK_STS_IOERR;
bio_endio(bio);
bio_io_error(bio);
return BLK_QC_T_NONE;
}
......
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