2006-08-20 16:45:05

by Oleg Nesterov

[permalink] [raw]
Subject: [PATCH] cfq_cic_link: fix? usage of wrong cfq_io_context

Obviously, cfq_cic_link() shouldn't free a just allocated cfq_io_context ?

Signed-off-by: Oleg Nesterov <[email protected]>

--- 2.6.18-rc4/block/cfq-iosched.c~7_set 2006-08-20 21:23:25.000000000 +0400
+++ 2.6.18-rc4/block/cfq-iosched.c 2006-08-21 00:53:27.000000000 +0400
@@ -1561,7 +1561,7 @@ restart:
/* ->key must be copied to avoid race with cfq_exit_queue() */
k = __cic->key;
if (unlikely(!k)) {
- cfq_drop_dead_cic(ioc, cic);
+ cfq_drop_dead_cic(ioc, __cic);
goto restart;
}



2006-08-21 00:35:01

by OGAWA Hirofumi

[permalink] [raw]
Subject: Re: [PATCH] cfq_cic_link: fix? usage of wrong cfq_io_context

Oleg Nesterov <[email protected]> writes:

> if (unlikely(!k)) {
> - cfq_drop_dead_cic(ioc, cic);
> + cfq_drop_dead_cic(ioc, __cic);
> goto restart;
> }

Ugh, I think you are right, and it's my fault. Sorry.
--
OGAWA Hirofumi <[email protected]>

2006-08-21 06:27:22

by Jens Axboe

[permalink] [raw]
Subject: Re: [PATCH] cfq_cic_link: fix? usage of wrong cfq_io_context

On Mon, Aug 21 2006, Oleg Nesterov wrote:
> Obviously, cfq_cic_link() shouldn't free a just allocated cfq_io_context ?
>
> Signed-off-by: Oleg Nesterov <[email protected]>
>
> --- 2.6.18-rc4/block/cfq-iosched.c~7_set 2006-08-20 21:23:25.000000000 +0400
> +++ 2.6.18-rc4/block/cfq-iosched.c 2006-08-21 00:53:27.000000000 +0400
> @@ -1561,7 +1561,7 @@ restart:
> /* ->key must be copied to avoid race with cfq_exit_queue() */
> k = __cic->key;
> if (unlikely(!k)) {
> - cfq_drop_dead_cic(ioc, cic);
> + cfq_drop_dead_cic(ioc, __cic);
> goto restart;
> }

Yep, that's a typo. Applied.

--
Jens Axboe