diff options
author | Mark Brown <broonie@linaro.org> | 2013-10-03 17:29:05 +0100 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-10-03 17:29:05 +0100 |
commit | 8e9c4aa4e7bd600d30e15ec82be9b670a1ec3da9 (patch) | |
tree | 3b19eb54c684e36feab568078018dea31c43a79f /block/blk-cgroup.c | |
parent | d60336e2f136287de821901d4a1b56179a0f7b69 (diff) | |
parent | 1d73ad298d1bfeee5d77c19e5cd667c551e30632 (diff) | |
download | op-kernel-dev-8e9c4aa4e7bd600d30e15ec82be9b670a1ec3da9.zip op-kernel-dev-8e9c4aa4e7bd600d30e15ec82be9b670a1ec3da9.tar.gz |
Merge remote-tracking branch 'asoc/fix/fsl' into asoc-fsl
Conflicts:
sound/soc/fsl/fsl_ssi.c
Diffstat (limited to 'block/blk-cgroup.c')
-rw-r--r-- | block/blk-cgroup.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index e90c7c1..4e491d9 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -235,8 +235,13 @@ static struct blkcg_gq *blkg_create(struct blkcg *blkcg, blkg->online = true; spin_unlock(&blkcg->lock); - if (!ret) + if (!ret) { + if (blkcg == &blkcg_root) { + q->root_blkg = blkg; + q->root_rl.blkg = blkg; + } return blkg; + } /* @blkg failed fully initialized, use the usual release path */ blkg_put(blkg); @@ -335,6 +340,15 @@ static void blkg_destroy(struct blkcg_gq *blkg) rcu_assign_pointer(blkcg->blkg_hint, NULL); /* + * If root blkg is destroyed. Just clear the pointer since root_rl + * does not take reference on root blkg. + */ + if (blkcg == &blkcg_root) { + blkg->q->root_blkg = NULL; + blkg->q->root_rl.blkg = NULL; + } + + /* * Put the reference taken at the time of creation so that when all * queues are gone, group can be destroyed. */ @@ -360,13 +374,6 @@ static void blkg_destroy_all(struct request_queue *q) blkg_destroy(blkg); spin_unlock(&blkcg->lock); } - - /* - * root blkg is destroyed. Just clear the pointer since - * root_rl does not take reference on root blkg. - */ - q->root_blkg = NULL; - q->root_rl.blkg = NULL; } /* @@ -970,8 +977,6 @@ int blkcg_activate_policy(struct request_queue *q, ret = PTR_ERR(blkg); goto out_unlock; } - q->root_blkg = blkg; - q->root_rl.blkg = blkg; list_for_each_entry(blkg, &q->blkg_list, q_node) cnt++; |