blkcg: don't offline parent blkcg first
authorTejun Heo <tj@kernel.org>
Wed, 24 Jul 2019 17:37:55 +0000 (10:37 -0700)
committerJens Axboe <axboe@kernel.dk>
Wed, 1 Apr 2020 20:56:44 +0000 (14:56 -0600)
commit4308a434e5e08c78676aa66bc626ef78cbef0883
treea6617ca3addbb90cc2be00a78a8d22e3da725d48
parentd866dbf6178713e37d2fec2870af00b345684e1a
blkcg: don't offline parent blkcg first

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.

Let's fix this by making child blkcgs pin the parents' online states.

Note that pin/unpin names are chosen over get/put intentionally
because css uses get/put online for something different.

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