diff options
author | Olof Johansson <olof@lixom.net> | 2018-09-25 20:30:47 +0200 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2018-09-25 20:30:47 +0200 |
commit | cdddeefc39cc26b2d429f8f7ea3c35bf8cb8c6a1 (patch) | |
tree | 2628d4922d0675df5659439f22f5ebda9c4b302a /mm/backing-dev.c | |
parent | Merge tag 'amlogic-drivers' of https://git.kernel.org/pub/scm/linux/kernel/gi... (diff) | |
parent | Linux 4.19-rc3 (diff) | |
download | linux-cdddeefc39cc26b2d429f8f7ea3c35bf8cb8c6a1.tar.xz linux-cdddeefc39cc26b2d429f8f7ea3c35bf8cb8c6a1.zip |
Merge tag 'v4.19-rc3' into next/drivers
Linux 4.19-rc3
Diffstat (limited to 'mm/backing-dev.c')
-rw-r--r-- | mm/backing-dev.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mm/backing-dev.c b/mm/backing-dev.c index f5981e9d6ae2..8a8bb8796c6c 100644 --- a/mm/backing-dev.c +++ b/mm/backing-dev.c @@ -491,6 +491,7 @@ 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); mutex_lock(&wb->bdi->cgwb_release_mutex); wb_shutdown(wb); @@ -499,6 +500,9 @@ static void cgwb_release_workfn(struct work_struct *work) css_put(wb->blkcg_css); mutex_unlock(&wb->bdi->cgwb_release_mutex); + /* triggers blkg destruction if cgwb_refcnt becomes zero */ + blkcg_cgwb_put(blkcg); + fprop_local_destroy_percpu(&wb->memcg_completions); percpu_ref_exit(&wb->refcnt); wb_exit(wb); @@ -597,6 +601,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_cgwb_get(blkcg); css_get(memcg_css); css_get(blkcg_css); } |