提交 35ed78b3 编写于 作者: G Guoqing Jiang 提交者: Jens Axboe

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

Use the two functions to simplify code.
Signed-off-by: NGuoqing Jiang <guoqing.jiang@cloud.ionos.com>
Reviewed-by: NNikolay Borisov <nborisov@suse.com>
Reviewed-by: NBart Van Assche <bvanassche@acm.org>
Reviewed-by: NChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册