diff options
author | Tejun Heo | 2019-08-28 15:05:52 -0700 |
---|---|---|
committer | Jens Axboe | 2019-08-28 21:17:03 -0600 |
commit | 86a5bba5c252e90d264c7460e29a0b9e633777e7 (patch) | |
tree | 764c165e3a9f51a9496868154e780b0fb4b33adf /block/blk-cgroup.c | |
parent | cf09a8ee19ad1f78b4e18cdde9f2a61133efacf5 (diff) |
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: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-cgroup.c')
-rw-r--r-- | block/blk-cgroup.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 6a82ca3fb5cf..78ccbdcfe723 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -1475,7 +1475,8 @@ int blkcg_policy_register(struct blkcg_policy *pol) blkcg->cpd[pol->plid] = cpd; cpd->blkcg = blkcg; cpd->plid = pol->plid; - pol->cpd_init_fn(cpd); + if (pol->cpd_init_fn) + pol->cpd_init_fn(cpd); } } |