[RFC PATCH] blk-mq: change bio_set_ioprio to inline

Liu Song
2022-08-30T09:46:32Z

From: Liu Song <liusong@linux.alibaba.com>

Change "bio_set_ioprio" to inline to avoid calling overhead.

Signed-off-by: Liu Song <liusong@linux.alibaba.com>
---
block/blk-mq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/blk-mq.c b/block/blk-mq.c
index c96c8c4..a17bc83 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -2766,7 +2766,7 @@ static inline struct request *blk_mq_get_cached_request(struct request_queue *q,
return rq;
}

-static void bio_set_ioprio(struct bio *bio)
+static inline void bio_set_ioprio(struct bio *bio)
{
/* Nobody set ioprio so far? Initialize it based on task's nice value */
if (IOPRIO_PRIO_CLASS(bio->bi_ioprio) == IOPRIO_CLASS_NONE)
--
1.8.3.1