mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 20:22:09 +00:00
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: 7caa47151a
("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>
This commit is contained in:
parent
8d1c1560c3
commit
3532e72272
@ -1876,6 +1876,7 @@ static int blk_iocost_init(struct request_queue *q)
|
|||||||
ret = blkcg_activate_policy(q, &blkcg_policy_iocost);
|
ret = blkcg_activate_policy(q, &blkcg_policy_iocost);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
rq_qos_del(q, rqos);
|
rq_qos_del(q, rqos);
|
||||||
|
free_percpu(ioc->pcpu_stat);
|
||||||
kfree(ioc);
|
kfree(ioc);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user