tizen: Use unique directory prefix for baselibs packages
[platform/kernel/linux-rpi.git] / block / blk-cgroup.c
index 4a42ea2..4b48c2c 100644 (file)
@@ -577,6 +577,7 @@ static void blkg_destroy_all(struct gendisk *disk)
        struct request_queue *q = disk->queue;
        struct blkcg_gq *blkg, *n;
        int count = BLKG_DESTROY_BATCH_SIZE;
+       int i;
 
 restart:
        spin_lock_irq(&q->queue_lock);
@@ -602,6 +603,18 @@ restart:
                }
        }
 
+       /*
+        * Mark policy deactivated since policy offline has been done, and
+        * the free is scheduled, so future blkcg_deactivate_policy() can
+        * be bypassed
+        */
+       for (i = 0; i < BLKCG_MAX_POLS; i++) {
+               struct blkcg_policy *pol = blkcg_policy[i];
+
+               if (pol)
+                       __clear_bit(pol->plid, q->blkcg_pols);
+       }
+
        q->root_blkg = NULL;
        spin_unlock_irq(&q->queue_lock);
 }