forked from Minki/linux
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>
This commit is contained in:
parent
74d46992e0
commit
37dcd6570f
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user