All of lore.kernel.org
 help / color / mirror / Atom feed
From: weiping zhang <zhangweiping@didichuxing.com>
To: <paolo.valente@linaro.org>, <axboe@kernel.dk>
Cc: <linux-block@vger.kernel.org>
Subject: [PATCH] block, bfq: fix error handle in bfq_init
Date: Sat, 19 Aug 2017 00:37:20 +0800	[thread overview]
Message-ID: <20170818163714.GA40576@localhost.didichuxing.com> (raw)

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

             reply	other threads:[~2017-08-18 16:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-18 16:37 weiping zhang [this message]
2017-08-23 15:25 ` [PATCH] block, bfq: fix error handle in bfq_init weiping zhang
2017-08-30 15:04   ` Paolo Valente
2017-08-23 21:35 ` Jens Axboe
2017-08-24  1:50   ` weiping zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170818163714.GA40576@localhost.didichuxing.com \
    --to=zhangweiping@didichuxing.com \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=paolo.valente@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.