summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorJosef Bacik <josef@toxicpanda.com>2026-10-28 10:41:26 -0600
committerJens Axboe <axboe@kernel.dk>2026-10-28 15:40:34 -0600
commit020f61242d6ebeba5f8f2ef6e429aeffdd63f1c1 (patch)
treef4a80b20c3664a21aee28d6f1eadf4ab4c979377 /block
parent4def096314cf29fb6940b74c087a0b923185580e (diff)
blk-iolatency: flush enable_work after going offline
blkcg_iolatency_exit() flushes enable_work before it deactivates the policy, but iolatency_pd_offline() schedules it again for the last group with a target, so the blk_iolatency is freed with the work queued. Flush it after the deactivation. Fixes: 8a177a36da6c ("blk-iolatency: Fix inflight count imbalances and IO hangs on offline") Cc: Tejun Heo <tj@kernel.org> Signed-off-by: Josef Bacik <josef@toxicpanda.com> Acked-by: Tejun Heo <tj@kernel.org> Link: https://patch.msgid.link/20261028164415.1262013-24-axboe@kernel.dk Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
-rw-r--r--block/blk-iolatency.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/block/blk-iolatency.c b/block/blk-iolatency.c
index 2caa79a008ad..c15b1aba606c 100644
--- a/block/blk-iolatency.c
+++ b/block/blk-iolatency.c
@@ -637,8 +637,9 @@ static void blkcg_iolatency_exit(struct rq_qos *rqos)
struct blk_iolatency *blkiolat = BLKIOLATENCY(rqos);
timer_shutdown_sync(&blkiolat->timer);
- flush_work(&blkiolat->enable_work);
blkcg_deactivate_policy(rqos->disk, &blkcg_policy_iolatency);
+ /* iolatency_pd_offline() schedules it for the last group with a target */
+ flush_work(&blkiolat->enable_work);
kfree(blkiolat);
}