]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - block/cfq-iosched.c
blkcg: unify blkg's for blkcg policies
[karo-tx-linux.git] / block / cfq-iosched.c
index dc73690dec44407e86c338d80581d15e93a8fe16..393eaa59913b2756b9f36ec780151f1f1baa27b0 100644 (file)
@@ -3462,15 +3462,13 @@ static void cfq_exit_queue(struct elevator_queue *e)
 
        spin_unlock_irq(q->queue_lock);
 
-       blkg_destroy_all(q, BLKIO_POLICY_PROP, true);
-
 #ifdef CONFIG_BLK_CGROUP
        /*
         * If there are groups which we could not unlink from blkcg list,
         * wait for a rcu period for them to be freed.
         */
        spin_lock_irq(q->queue_lock);
-       wait = q->nr_blkgs[BLKIO_POLICY_PROP];
+       wait = q->nr_blkgs;
        spin_unlock_irq(q->queue_lock);
 #endif
        cfq_shutdown_timer_wq(cfqd);
@@ -3492,6 +3490,7 @@ static void cfq_exit_queue(struct elevator_queue *e)
 #ifndef CONFIG_CFQ_GROUP_IOSCHED
        kfree(cfqd->root_group);
 #endif
+       update_root_blkg_pd(q, BLKIO_POLICY_PROP);
        kfree(cfqd);
 }