summaryrefslogtreecommitdiffstats
path: root/block/bfq-iosched.c
diff options
context:
space:
mode:
authorweiping zhang <zhangweiping@didichuxing.com>2017-08-18 18:37:20 +0200
committerJens Axboe <axboe@kernel.dk>2017-08-23 23:35:54 +0200
commit37dcd6570f2e95364c26426d4110ba40c07df067 (patch)
treef8e42939f4e973d805307bcdecb6c5ee16c8849d /block/bfq-iosched.c
parentblock: replace bi_bdev with a gendisk pointer and partitions index (diff)
downloadlinux-37dcd6570f2e95364c26426d4110ba40c07df067.tar.xz
linux-37dcd6570f2e95364c26426d4110ba40c07df067.zip
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>
Diffstat (limited to 'block/bfq-iosched.c')
-rw-r--r--block/bfq-iosched.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
index 509f39998011..ea2832b6698c 100644
--- a/block/bfq-iosched.c
+++ b/block/bfq-iosched.c
@@ -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);