* [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
* Re: [PATCH] block, bfq: fix error handle in bfq_init
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
1 sibling, 1 reply; 5+ messages in thread
From: weiping zhang @ 2017-08-23 15:25 UTC (permalink / raw)
To: paolo.valente, axboe; +Cc: linux-block
On Sat, Aug 19, 2017 at 12:37:20AM +0800, weiping zhang wrote:
> 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
>
Hi Paolo, Jens,
could you give some comments for this patch ?
Thanks
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] block, bfq: fix error handle in bfq_init
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-23 21:35 ` Jens Axboe
2017-08-24 1:50 ` weiping zhang
1 sibling, 1 reply; 5+ messages in thread
From: Jens Axboe @ 2017-08-23 21:35 UTC (permalink / raw)
To: paolo.valente, linux-block
On 08/18/2017 10:37 AM, weiping zhang wrote:
> if elv_register fail, bfq_pool should be free.
Looks correct to me, I'll add it. Thanks.
--
Jens Axboe
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] block, bfq: fix error handle in bfq_init
2017-08-23 21:35 ` Jens Axboe
@ 2017-08-24 1:50 ` weiping zhang
0 siblings, 0 replies; 5+ messages in thread
From: weiping zhang @ 2017-08-24 1:50 UTC (permalink / raw)
To: Jens Axboe; +Cc: paolo.valente, linux-block
> =D4=DA 2017=C4=EA8=D4=C224=C8=D5=A3=AC05:35=A3=ACJens Axboe =
<axboe@kernel.dk> =D0=B4=B5=C0=A3=BA
>=20
> On 08/18/2017 10:37 AM, weiping zhang wrote:
>> if elv_register fail, bfq_pool should be free.
>=20
> Looks correct to me, I'll add it. Thanks.
>=20
> --=20
> Jens Axboe
>=20
Jens,
Thanks a lot=
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] block, bfq: fix error handle in bfq_init
2017-08-23 15:25 ` weiping zhang
@ 2017-08-30 15:04 ` Paolo Valente
0 siblings, 0 replies; 5+ messages in thread
From: Paolo Valente @ 2017-08-30 15:04 UTC (permalink / raw)
To: weiping zhang; +Cc: axboe, linux-block
> Il giorno 23 ago 2017, alle ore 17:25, weiping zhang =
<zhangweiping@didichuxing.com> ha scritto:
>=20
> On Sat, Aug 19, 2017 at 12:37:20AM +0800, weiping zhang wrote:
>> if elv_register fail, bfq_pool should be free.
>>=20
>> Signed-off-by: weiping zhang <zhangweiping@didichuxing.com>
>> ---
>> block/bfq-iosched.c | 4 +++-
>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>=20
>> 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)
>>=20
>> ret =3D elv_register(&iosched_bfq_mq);
>> if (ret)
>> - goto err_pol_unreg;
>> + goto slab_kill;
>>=20
>> return 0;
>>=20
>> +slab_kill:
>> + bfq_slab_kill();
>> err_pol_unreg:
>> #ifdef CONFIG_BFQ_GROUP_IOSCHED
>> blkcg_policy_unregister(&blkcg_policy_bfq);
>> --=20
>> 2.9.4
>>=20
> Hi Paolo, Jens,
>=20
> could you give some comments for this patch ?
>=20
Sorry for not making it in time (vacation), and thanks for fixing this
bug.
Paolo
> Thanks
^ permalink raw reply [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.