blkcg: rename blkcg->cgwb_refcnt to ->online_pin and always use it
authorTejun Heo <tj@kernel.org>
Wed, 24 Jul 2019 17:37:22 +0000 (10:37 -0700)
committerJens Axboe <axboe@kernel.dk>
Wed, 1 Apr 2020 20:56:42 +0000 (14:56 -0600)
commitd866dbf6178713e37d2fec2870af00b345684e1a
treef87bdafbbe76c032b7d56a4612d63d3c89167e1a
parent1a323ea5356edbb3073dc59d51b9e6b86908857d
blkcg: rename blkcg->cgwb_refcnt to ->online_pin and always use it

blkcg->cgwb_refcnt is used to delay blkcg offlining so that blkgs
don't get offlined while there are active cgwbs on them.  However, it
ends up making offlining unordered sometimes causing parents to be
offlined before children.

To fix it, we want child blkcgs to pin the parents' online states
turning the refcnt into a more generic online pinning mechanism.

In prepartion,

* blkcg->cgwb_refcnt -> blkcg->online_pin
* blkcg_cgwb_get/put() -> blkcg_pin/unpin_online()
* Take them out of CONFIG_CGROUP_WRITEBACK

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-cgroup.c
include/linux/blk-cgroup.h
mm/backing-dev.c