1
0
Fork 0

block, bfq: fix error handle in bfq_init

if elv_register fail, bfq_pool should be free.

Signed-off-by: weiping zhang <zhangweiping@didichuxing.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
hifive-unleashed-5.1
weiping zhang 2017-08-19 00:37:20 +08:00 committed by Jens Axboe
parent 74d46992e0
commit 37dcd6570f
1 changed files with 3 additions and 1 deletions

View File

@ -5062,10 +5062,12 @@ static int __init bfq_init(void)
ret = elv_register(&iosched_bfq_mq);
if (ret)
goto err_pol_unreg;
goto slab_kill;
return 0;
slab_kill:
bfq_slab_kill();
err_pol_unreg:
#ifdef CONFIG_BFQ_GROUP_IOSCHED
blkcg_policy_unregister(&blkcg_policy_bfq);