diff options
author | Jens Axboe <axboe@kernel.dk> | 2017-09-30 10:08:24 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-10-03 16:38:17 +0200 |
commit | 7beb2f845b715cb98584cf630e9a9d5b05501166 (patch) | |
tree | 115050af0790b5a6c089d40a71abf0eb7ed53de9 /block/blk-mq.c | |
parent | blk-mq-tag: kill unused tag enums (diff) | |
download | linux-7beb2f845b715cb98584cf630e9a9d5b05501166.tar.xz linux-7beb2f845b715cb98584cf630e9a9d5b05501166.zip |
blk-mq: wire up completion notifier for laptop mode
For some reason, the laptop mode IO completion notified was never wired
up for blk-mq. Ensure that we trigger the callback appropriately, to arm
the laptop mode flush timer.
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Bart Van Assche <Bart.VanAssche@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-mq.c')
-rw-r--r-- | block/blk-mq.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c index 59687ed6561b..7f01d69879d6 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -476,6 +476,9 @@ void blk_mq_free_request(struct request *rq) if (rq->rq_flags & RQF_MQ_INFLIGHT) atomic_dec(&hctx->nr_active); + if (unlikely(laptop_mode && !blk_rq_is_passthrough(rq))) + laptop_io_completion(q->backing_dev_info); + wbt_done(q->rq_wb, &rq->issue_stat); clear_bit(REQ_ATOM_STARTED, &rq->atomic_flags); |