aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2013-01-09 11:05:10 -0500
committerTejun Heo <tj@kernel.org>2013-01-09 11:05:10 -0500
commit356d2e581032b686da0854c7f17de2027c872762 (patch)
treec3c10018d5856523ba6a8a3816b433a1b5214412 /block
parentb226e5c411759eec29308f0ea38e918aa695dc7f (diff)
blkcg: fix minor bug in blkg_alloc()
blkg_alloc() was mistakenly checking blkcg_policy_enabled() twice. The latter test should have been on whether pol->pd_init_fn() exists. This doesn't cause actual problems because both blkcg policies implement pol->pd_init_fn(). Fix it. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Vivek Goyal <vgoyal@redhat.com>
Diffstat (limited to 'block')
-rw-r--r--block/blk-cgroup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index b8858fb0cafa..7ef747b7f056 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -114,7 +114,7 @@ static struct blkcg_gq *blkg_alloc(struct blkcg *blkcg, struct request_queue *q,
114 pd->blkg = blkg; 114 pd->blkg = blkg;
115 115
116 /* invoke per-policy init */ 116 /* invoke per-policy init */
117 if (blkcg_policy_enabled(blkg->q, pol)) 117 if (pol->pd_init_fn)
118 pol->pd_init_fn(blkg); 118 pol->pd_init_fn(blkg);
119 } 119 }
120 120