projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8264c32
)
blkcg: check pol->cpd_free_fn before free cpd
author
weiping zhang
<zhangweiping@didichuxing.com>
Tue, 10 Oct 2017 14:53:46 +0000
(22:53 +0800)
committer
Jens Axboe
<axboe@kernel.dk>
Tue, 10 Oct 2017 15:04:47 +0000
(09:04 -0600)
check pol->cpd_free_fn() instead of pol->cpd_alloc_fn() when free cpd.
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: weiping zhang <zhangweiping@didichuxing.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-cgroup.c
patch
|
blob
|
blame
|
history
diff --git
a/block/blk-cgroup.c
b/block/blk-cgroup.c
index d3f56baee9366220d13db3cc8668ae1a7a1c1994..e7ec676043b1cc2f9c351a62f95fdaf22aeea464 100644
(file)
--- a/
block/blk-cgroup.c
+++ b/
block/blk-cgroup.c
@@
-1452,7
+1452,7
@@
int blkcg_policy_register(struct blkcg_policy *pol)
return 0;
err_free_cpds:
- if (pol->cpd_
alloc
_fn) {
+ if (pol->cpd_
free
_fn) {
list_for_each_entry(blkcg, &all_blkcgs, all_blkcgs_node) {
if (blkcg->cpd[pol->plid]) {
pol->cpd_free_fn(blkcg->cpd[pol->plid]);
@@
-1492,7
+1492,7
@@
void blkcg_policy_unregister(struct blkcg_policy *pol)
/* remove cpds and unregister */
mutex_lock(&blkcg_pol_mutex);
- if (pol->cpd_
alloc
_fn) {
+ if (pol->cpd_
free
_fn) {
list_for_each_entry(blkcg, &all_blkcgs, all_blkcgs_node) {
if (blkcg->cpd[pol->plid]) {
pol->cpd_free_fn(blkcg->cpd[pol->plid]);