diff options
author | Guoqing Jiang <guoqing.jiang@cloud.ionos.com> | 2020-03-09 22:41:34 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-03-12 07:42:54 -0600 |
commit | 35ed78b32cbbb6499b82e7a3a6769fa14e4b3c92 (patch) | |
tree | a57ae1336d1f9b040471d6dca1772ac0f6f1ef85 /block | |
parent | 0d72031820a710c82fde4ed61352ff2a4217e6dd (diff) | |
download | linux-stable-35ed78b32cbbb6499b82e7a3a6769fa14e4b3c92.tar.gz linux-stable-35ed78b32cbbb6499b82e7a3a6769fa14e4b3c92.tar.bz2 linux-stable-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')
-rw-r--r-- | block/blk-core.c | 5 |
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; } |