summaryrefslogtreecommitdiff
path: root/block/blk-core.c
diff options
context:
space:
mode:
authorGuoqing Jiang <guoqing.jiang@cloud.ionos.com>2020-03-09 22:41:34 +0100
committerJens Axboe <axboe@kernel.dk>2020-03-12 07:42:54 -0600
commit35ed78b32cbbb6499b82e7a3a6769fa14e4b3c92 (patch)
treea57ae1336d1f9b040471d6dca1772ac0f6f1ef85 /block/blk-core.c
parent0d72031820a710c82fde4ed61352ff2a4217e6dd (diff)
downloadlwn-35ed78b32cbbb6499b82e7a3a6769fa14e4b3c92.tar.gz
lwn-35ed78b32cbbb6499b82e7a3a6769fa14e4b3c92.zip
block: use bio_{wouldblock,io}_error in direct_make_request
Use the two functions to simplify code. Signed-off-by: Guoqing Jiang <guoqing.jiang@cloud.ionos.com> Reviewed-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-core.c')
-rw-r--r--block/blk-core.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index e26341aa2e3a..9a78f62285f9 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -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;
}