Commit 86a5bba5 authored by Tejun Heo's avatar Tejun Heo Committed by Jens Axboe

blkcg: make ->cpd_init_fn() optional

For policies which can do enough initialization from ->cpd_alloc_fn(),
make ->cpd_init_fn() optional.
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent cf09a8ee
...@@ -1475,7 +1475,8 @@ int blkcg_policy_register(struct blkcg_policy *pol) ...@@ -1475,7 +1475,8 @@ int blkcg_policy_register(struct blkcg_policy *pol)
blkcg->cpd[pol->plid] = cpd; blkcg->cpd[pol->plid] = cpd;
cpd->blkcg = blkcg; cpd->blkcg = blkcg;
cpd->plid = pol->plid; cpd->plid = pol->plid;
pol->cpd_init_fn(cpd); if (pol->cpd_init_fn)
pol->cpd_init_fn(cpd);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment