diff options
author | Tejun Heo <tj@kernel.org> | 2019-08-29 01:05:52 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-08-29 06:17:03 +0300 |
commit | 86a5bba5c252e90d264c7460e29a0b9e633777e7 (patch) | |
tree | 764c165e3a9f51a9496868154e780b0fb4b33adf /block | |
parent | cf09a8ee19ad1f78b4e18cdde9f2a61133efacf5 (diff) | |
download | linux-86a5bba5c252e90d264c7460e29a0b9e633777e7.tar.xz |
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')
-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); } } |