summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorRitika Srivastava <ritika.srivastava@oracle.com>2020-09-01 22:17:30 +0200
committerJens Axboe <axboe@kernel.dk>2020-09-02 03:38:33 +0200
commit143d2600faf1563fd4125686ab84afaab5fb513b (patch)
treee378c775c911d7131369174625dc0f8e0d4cc8b9 /block
parentblock: grant IOPRIO_CLASS_RT to CAP_SYS_NICE (diff)
downloadlinux-143d2600faf1563fd4125686ab84afaab5fb513b.tar.xz
linux-143d2600faf1563fd4125686ab84afaab5fb513b.zip
block: Return blk_status_t instead of errno codes
Replace returning legacy errno codes with blk_status_t in blk_cloned_rq_check_limits(). Signed-off-by: Ritika Srivastava <ritika.srivastava@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
-rw-r--r--block/blk-core.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index 062efdedc994..3fbb5b2d5385 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -1145,14 +1145,14 @@ EXPORT_SYMBOL(submit_bio);
* limits when retrying requests on other queues. Those requests need
* to be checked against the new queue limits again during dispatch.
*/
-static int blk_cloned_rq_check_limits(struct request_queue *q,
+static blk_status_t blk_cloned_rq_check_limits(struct request_queue *q,
struct request *rq)
{
if (blk_rq_sectors(rq) > blk_queue_get_max_sectors(q, req_op(rq))) {
printk(KERN_ERR "%s: over max size limit. (%u > %u)\n",
__func__, blk_rq_sectors(rq),
blk_queue_get_max_sectors(q, req_op(rq)));
- return -EIO;
+ return BLK_STS_IOERR;
}
/*
@@ -1165,10 +1165,10 @@ static int blk_cloned_rq_check_limits(struct request_queue *q,
if (rq->nr_phys_segments > queue_max_segments(q)) {
printk(KERN_ERR "%s: over max segments limit. (%hu > %hu)\n",
__func__, rq->nr_phys_segments, queue_max_segments(q));
- return -EIO;
+ return BLK_STS_IOERR;
}
- return 0;
+ return BLK_STS_OK;
}
/**