block, bfq: cleanup 'bfqg->online'
authorYu Kuai <yukuai3@huawei.com>
Thu, 2 Feb 2023 13:49:13 +0000 (21:49 +0800)
committerJens Axboe <axboe@kernel.dk>
Tue, 7 Feb 2023 17:20:59 +0000 (10:20 -0700)
commitf37bf75ca73d523ebaa7ceb44c45d8ecd05374fe
tree20f48f05fc691267c0e6df9e2665b23ef2f960bb
parent455944e4e439efc280da5f59ca6f5b014ac7b242
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>
block/bfq-cgroup.c
block/bfq-iosched.h
block/blk-cgroup.c