提交 356d2e58 编写于 作者: T Tejun Heo

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: NTejun Heo <tj@kernel.org>
Acked-by: NVivek Goyal <vgoyal@redhat.com>
上级 b226e5c4
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册