mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
block: move blk_stat_add() to __blk_mq_end_request()
We want this next to blk_account_io_done() for the next change so that we can call ktime_get() only once for both. Signed-off-by: Omar Sandoval <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
1 parent
84c7afcebe
commit
4bc6339a58
1 file changed
+5
-4
+5
-4
@@ -506,6 +506,11 @@ EXPORT_SYMBOL_GPL(blk_mq_free_request);
|
||||
|
||||
inline void __blk_mq_end_request(struct request *rq, blk_status_t error)
|
||||
{
|
||||
if (rq->rq_flags & RQF_STATS) {
|
||||
blk_mq_poll_stats_start(rq->q);
|
||||
blk_stat_add(rq);
|
||||
}
|
||||
|
||||
blk_account_io_done(rq);
|
||||
|
||||
if (rq->end_io) {
|
||||
@@ -545,10 +550,6 @@ static void __blk_mq_complete_request(struct request *rq)
|
||||
|
||||
if (rq->internal_tag != -1)
|
||||
blk_mq_sched_completed_request(rq);
|
||||
if (rq->rq_flags & RQF_STATS) {
|
||||
blk_mq_poll_stats_start(rq->q);
|
||||
blk_stat_add(rq);
|
||||
}
|
||||
|
||||
if (!test_bit(QUEUE_FLAG_SAME_COMP, &rq->q->queue_flags)) {
|
||||
rq->q->softirq_done_fn(rq);
|
||||
|
||||
Reference in new issue
Block a user