All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] block, bfq: fix error handle in bfq_init
@ 2017-08-18 16:37 weiping zhang
  2017-08-23 15:25 ` weiping zhang
  2017-08-23 21:35 ` Jens Axboe
  0 siblings, 2 replies; 5+ messages in thread
From: weiping zhang @ 2017-08-18 16:37 UTC (permalink / raw)
  To: paolo.valente, axboe; +Cc: linux-block

if elv_register fail, bfq_pool should be free.

Signed-off-by: weiping zhang <zhangweiping@didichuxing.com>
---
 block/bfq-iosched.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
index 436b6ca..bdb072f 100644
--- a/block/bfq-iosched.c
+++ b/block/bfq-iosched.c
@@ -5048,10 +5048,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);
-- 
2.9.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-08-30 15:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-18 16:37 [PATCH] block, bfq: fix error handle in bfq_init weiping zhang
2017-08-23 15:25 ` weiping zhang
2017-08-30 15:04   ` Paolo Valente
2017-08-23 21:35 ` Jens Axboe
2017-08-24  1:50   ` weiping zhang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.