Skip to content

Commit

Permalink
blkcg: fix minor bug in blkg_alloc()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tejun Heo committed Jan 9, 2013
1 parent b226e5c commit 356d2e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion block/blk-cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 356d2e5

Please sign in to comment.