summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
Diffstat (limited to 'block')
-rw-r--r--block/blk-cgroup.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index 57941d2a8ba3..3e03c0d13253 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -1084,12 +1084,10 @@ struct list_head *blkcg_get_cgwb_list(struct cgroup_subsys_state *css)
*/
static void blkcg_destroy_blkgs(struct blkcg *blkcg)
{
- int cpu;
-
might_sleep();
- css_get(&blkcg->css);
spin_lock_irq(&blkcg->lock);
+
while (!hlist_empty(&blkcg->blkg_list)) {
struct blkcg_gq *blkg = hlist_entry(blkcg->blkg_list.first,
struct blkcg_gq, blkcg_node);
@@ -1112,17 +1110,6 @@ static void blkcg_destroy_blkgs(struct blkcg *blkcg)
}
spin_unlock_irq(&blkcg->lock);
-
- /*
- * Flush all the non-empty percpu lockless lists.
- */
- for_each_possible_cpu(cpu) {
- struct llist_head *lhead = per_cpu_ptr(blkcg->lhead, cpu);
-
- if (!llist_empty(lhead))
- cgroup_rstat_css_cpu_flush(&blkcg->css, cpu);
- }
- css_put(&blkcg->css);
}
/**