diff options
author | Chaitanya Kulkarni <kch@nvidia.com> | 2023-03-27 09:34:27 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2023-03-27 21:22:58 +0200 |
commit | 06965037ce942500c1ce3aa29ca217093a9c5720 (patch) | |
tree | ca2fdca57023fd71e28acc58d636f917c35ffe3c /block/blk-mq.c | |
parent | block: open code __blk_account_io_start() (diff) | |
download | linux-06965037ce942500c1ce3aa29ca217093a9c5720.tar.xz linux-06965037ce942500c1ce3aa29ca217093a9c5720.zip |
block: open code __blk_account_io_done()
There is only one caller for __blk_account_io_done(), the function
is small enough to fit in its caller blk_account_io_done().
Remove the function and opencode in the its caller
blk_account_io_done().
Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com>
Link: https://lore.kernel.org/r/20230327073427.4403-2-kch@nvidia.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-mq.c')
-rw-r--r-- | block/blk-mq.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c index eb091f42cfc1..52f8e0099c7f 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -953,17 +953,6 @@ bool blk_update_request(struct request *req, blk_status_t error, } EXPORT_SYMBOL_GPL(blk_update_request); -static void __blk_account_io_done(struct request *req, u64 now) -{ - const int sgrp = op_stat_group(req_op(req)); - - part_stat_lock(); - update_io_ticks(req->part, jiffies, true); - part_stat_inc(req->part, ios[sgrp]); - part_stat_add(req->part, nsecs[sgrp], now - req->start_time_ns); - part_stat_unlock(); -} - static inline void blk_account_io_done(struct request *req, u64 now) { /* @@ -972,8 +961,15 @@ static inline void blk_account_io_done(struct request *req, u64 now) * containing request is enough. */ if (blk_do_io_stat(req) && req->part && - !(req->rq_flags & RQF_FLUSH_SEQ)) - __blk_account_io_done(req, now); + !(req->rq_flags & RQF_FLUSH_SEQ)) { + const int sgrp = op_stat_group(req_op(req)); + + part_stat_lock(); + update_io_ticks(req->part, jiffies, true); + part_stat_inc(req->part, ios[sgrp]); + part_stat_add(req->part, nsecs[sgrp], now - req->start_time_ns); + part_stat_unlock(); + } } static inline void blk_account_io_start(struct request *req) |