diff options
author | Yu Kuai <yukuai3@huawei.com> | 2023-02-02 21:49:13 +0800 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2023-02-07 10:20:59 -0700 |
commit | f37bf75ca73d523ebaa7ceb44c45d8ecd05374fe (patch) | |
tree | 20f48f05fc691267c0e6df9e2665b23ef2f960bb /block/blk-cgroup.c | |
parent | 455944e4e439efc280da5f59ca6f5b014ac7b242 (diff) |
block, bfq: cleanup 'bfqg->online'
After commit dfd6200a0954 ("blk-cgroup: support to track if policy is
online"), there is no need to do this again in bfq.
However, 'pd->online' is not protected by 'bfqd->lock', in order to make
sure bfq won't see that 'pd->online' is still set after bfq_pd_offline(),
clear it before bfq_pd_offline() is called. This is fine because other
polices doesn't use 'pd->online' and bfq_pd_offline() will move active
bfqq to root cgroup anyway.
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20230202134913.2364549-1-yukuai1@huaweicloud.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-cgroup.c')
-rw-r--r-- | block/blk-cgroup.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index c46778d1f3c2..d8fe607138b9 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -479,9 +479,9 @@ static void blkg_destroy(struct blkcg_gq *blkg) struct blkcg_policy *pol = blkcg_policy[i]; if (blkg->pd[i] && blkg->pd[i]->online) { + blkg->pd[i]->online = false; if (pol->pd_offline_fn) pol->pd_offline_fn(blkg->pd[i]); - blkg->pd[i]->online = false; } } |