mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 04:33:26 +02:00
blk-cgroup: move blkcg_{pin,unpin}_online out of line
Move these two functions out of line as there is no good reason to inline them. Also switch to passing a cgroup_subsys_state instead of doing the conversion in the caller to prepare for making the blkcg structure private to blk-cgroup. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Tejun Heo <tj@kernel.org> Link: https://lore.kernel.org/r/20220420042723.1010598-7-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
committed by
Jens Axboe
parent
216889aad3
commit
397c9f46ee
@@ -390,7 +390,6 @@ static void cgwb_release_workfn(struct work_struct *work)
|
||||
{
|
||||
struct bdi_writeback *wb = container_of(work, struct bdi_writeback,
|
||||
release_work);
|
||||
struct blkcg *blkcg = css_to_blkcg(wb->blkcg_css);
|
||||
struct backing_dev_info *bdi = wb->bdi;
|
||||
|
||||
mutex_lock(&wb->bdi->cgwb_release_mutex);
|
||||
@@ -401,7 +400,7 @@ static void cgwb_release_workfn(struct work_struct *work)
|
||||
mutex_unlock(&wb->bdi->cgwb_release_mutex);
|
||||
|
||||
/* triggers blkg destruction if no online users left */
|
||||
blkcg_unpin_online(blkcg);
|
||||
blkcg_unpin_online(wb->blkcg_css);
|
||||
|
||||
fprop_local_destroy_percpu(&wb->memcg_completions);
|
||||
|
||||
@@ -511,7 +510,7 @@ static int cgwb_create(struct backing_dev_info *bdi,
|
||||
list_add_tail_rcu(&wb->bdi_node, &bdi->wb_list);
|
||||
list_add(&wb->memcg_node, memcg_cgwb_list);
|
||||
list_add(&wb->blkcg_node, blkcg_cgwb_list);
|
||||
blkcg_pin_online(blkcg);
|
||||
blkcg_pin_online(blkcg_css);
|
||||
css_get(memcg_css);
|
||||
css_get(blkcg_css);
|
||||
}
|
||||
|
Reference in New Issue
Block a user