diff options
author | Tejun Heo <tj@kernel.org> | 2019-08-29 18:53:06 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-08-29 18:59:14 +0300 |
commit | 3532e7227243beb0b782266dc05c40b6184ad051 (patch) | |
tree | e468064878a4d18da9959d83e3668709b2767afa | |
parent | 8d1c1560c383004e09c6a39498094671cc664e6b (diff) | |
download | linux-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>
-rw-r--r-- | block/blk-iocost.c | 1 |
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; } |