OSDN Git Service
(root)
/
android-x86
/
kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cf09a8e
)
blkcg: make ->cpd_init_fn() optional
author
Tejun Heo
<tj@kernel.org>
Wed, 28 Aug 2019 22:05:52 +0000
(15:05 -0700)
committer
Jens Axboe
<axboe@kernel.dk>
Thu, 29 Aug 2019 03:17:03 +0000
(21:17 -0600)
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>
block/blk-cgroup.c
patch
|
blob
|
history
diff --git
a/block/blk-cgroup.c
b/block/blk-cgroup.c
index
6a82ca3
..
78ccbdc
100644
(file)
--- 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);
}
}