Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1475,6 +1475,7 @@ int blkcg_policy_register(struct blkcg_policy *pol)
			blkcg->cpd[pol->plid] = cpd;
			cpd->blkcg = blkcg;
			cpd->plid = pol->plid;
			if (pol->cpd_init_fn)
				pol->cpd_init_fn(cpd);
		}
	}