X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=block%2Fblk-cgroup.c;h=4b48c2c44098131328447f80172269657e64c2d0;hb=refs%2Fheads%2Ftizen;hp=4a42ea2972ad85693480c5e9c0e9599923c73ccf;hpb=744a759492b5c57ff24a6e8aabe47b17ad8ee964;p=platform%2Fkernel%2Flinux-rpi.git diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 4a42ea2..4b48c2c 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -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); }