]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
blkcg: fix minor bug in blkg_alloc()
authorTejun Heo <tj@kernel.org>
Wed, 9 Jan 2013 16:05:10 +0000 (08:05 -0800)
committerTejun Heo <tj@kernel.org>
Wed, 9 Jan 2013 16:05:10 +0000 (08:05 -0800)
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>
block/blk-cgroup.c

index b8858fb0cafa34e491f6ad0e719a16ba3cd8d015..7ef747b7f05615cba6d270b7571d97d2521a7efa 100644 (file)
@@ -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);
        }