Commit 3532e722 authored by Tejun Heo's avatar Tejun Heo Committed by Jens Axboe

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: 7caa4715 ("blkcg: implement blk-iocost")
Reported-by: default avatarHillf Danton <hdanton@sina.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 8d1c1560
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment