Skip to contentSkip to conversation

block: don't define __blk_mq_end_request() as inline

PATCH In review Ming Lei 2 participants 2 messages Mar 19, 2025 Block layer

lore
Share & tools
lore

Ming Lei

author
#0 lore raw

PATCH 1/1 block: don't define __blk_mq_end_request() as inline

It doesn't make sense to define one global symbol as inline, also this way cause __blk_mq_end_request become not traceable.

Fix it by removing the 'inline' annotation.

---
 block/blk-mq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
block/blk-mq.c +1 -1
index ae8494d88897..1301965dae71 100644
@@ -1123,7 +1123,7 @@ static inline void __blk_mq_end_request_acct(struct request *rq, u64 now)
 	blk_account_io_done(rq, now);
 }
 
-inline void __blk_mq_end_request(struct request *rq, blk_status_t error)
+void __blk_mq_end_request(struct request *rq, blk_status_t error)
 {
 	if (blk_mq_need_time_stamp(rq))
 		__blk_mq_end_request_acct(rq, blk_time_get_ns());
Signature · 1 line
2.47.1
maintainer
#1 lore raw
Quoted 2 lines · Ming Lei

It doesn't make sense to define one global symbol as inline, also this way cause __blk_mq_end_request become not traceable.

It does for the local scope though, it'll force it inline for blk_mq_end_request(), for example.

Signature · 1 line
Jens Axboe