From: Ritika Srivastava ritika.srivastava@oracle.com
mainline inclusion from mainline-v5.10 commit 143d2600faf1563fd4125686ab84afaab5fb513b category: bugfix bugzilla: 46895 CVE: NA ---------------------------
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
Conflicts: block/blk-core.c
Signed-off-by: yangerkun yangerkun@huawei.com Reviewed-by: Jason Yan yanaijie@huawei.com Signed-off-by: Yang Yingliang yangyingliang@huawei.com Signed-off-by: Cheng Jian cj.chengjian@huawei.com --- block/blk-core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/block/blk-core.c b/block/blk-core.c index bf1049cf598b..498f74166574 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -2594,12 +2594,12 @@ EXPORT_SYMBOL_GPL(blk_poll); * 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.\n", __func__); - return -EIO; + return BLK_STS_IOERR; }
/* @@ -2611,10 +2611,10 @@ static int blk_cloned_rq_check_limits(struct request_queue *q, blk_recalc_rq_segments(rq); if (rq->nr_phys_segments > queue_max_segments(q)) { printk(KERN_ERR "%s: over max segments limit.\n", __func__); - return -EIO; + return BLK_STS_IOERR; }
- return 0; + return BLK_STS_OK; }
/**