From: Tejun Heo Date: Wed, 9 Jan 2013 16:05:10 +0000 (-0800) Subject: blkcg: fix minor bug in blkg_alloc() X-Git-Tag: next-20130218~57^2~8^2^2~18 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=356d2e581032b686da0854c7f17de2027c872762;p=karo-tx-linux.git 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 Acked-by: Vivek Goyal --- 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, pd->blkg = blkg; /* invoke per-policy init */ - if (blkcg_policy_enabled(blkg->q, pol)) + if (pol->pd_init_fn) pol->pd_init_fn(blkg); }