summaryrefslogtreecommitdiff
path: root/block/blk-iocost.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2019-08-29 18:53:06 +0300
committerJens Axboe <axboe@kernel.dk>2019-08-29 18:59:14 +0300
commit3532e7227243beb0b782266dc05c40b6184ad051 (patch)
treee468064878a4d18da9959d83e3668709b2767afa /block/blk-iocost.c
parent8d1c1560c383004e09c6a39498094671cc664e6b (diff)
downloadlinux-3532e7227243beb0b782266dc05c40b6184ad051.tar.xz
blkcg: fix missing free on error path of blk_iocost_init()
blk_iocost_init() forgot to free its percpu stat on the error path. Fix it. Fixes: 7caa47151ab2 ("blkcg: implement blk-iocost") Reported-by: Hillf Danton <hdanton@sina.com> Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-iocost.c')
-rw-r--r--block/blk-iocost.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/block/blk-iocost.c b/block/blk-iocost.c
index f04a4ed1cb45..9c8046ac5925 100644
--- a/block/blk-iocost.c
+++ b/block/blk-iocost.c
@@ -1876,6 +1876,7 @@ static int blk_iocost_init(struct request_queue *q)
ret = blkcg_activate_policy(q, &blkcg_policy_iocost);
if (ret) {
rq_qos_del(q, rqos);
+ free_percpu(ioc->pcpu_stat);
kfree(ioc);
return ret;
}