--- a/block/blk-throttle.c 2022-04-16 06:56:37.857427700 +0800 +++ b/block/blk-throttle.c 2022-04-16 07:15:44.803445700 +0800 @@ -493,9 +493,9 @@ static void throtl_pd_offline(struct blk throtl_upgrade_state(tg->td); } -static void throtl_pd_free(struct blkg_policy_data *pd) +static void throtl_grp_free_workfn(struct work_struct *work) { - struct throtl_grp *tg = pd_to_tg(pd); + struct throtl_grp *tg = container_of(work, struct throtl_grp, free_work); del_timer_sync(&tg->service_queue.pending_timer); blkg_rwstat_exit(&tg->stat_bytes); @@ -503,6 +503,14 @@ static void throtl_pd_free(struct blkg_p kfree(tg); } +static void throtl_pd_free(struct blkg_policy_data *pd) +{ + struct throtl_grp *tg = pd_to_tg(pd); + + INIT_WORK(&tg->free_work, throtl_grp_free_workfn); + queue_work(system_unbound_wq, &tg->free_work); +} + static struct throtl_grp * throtl_rb_first(struct throtl_service_queue *parent_sq) { --- a/block/blk-throttle.h 2022-04-16 06:56:24.885706800 +0800 +++ b/block/blk-throttle.h 2022-04-16 07:06:21.260907700 +0800 @@ -141,6 +141,8 @@ struct throtl_grp { struct blkg_rwstat stat_bytes; struct blkg_rwstat stat_ios; + + struct work_struct free_work; }; extern struct blkcg_policy blkcg_policy_throtl;