Skip to contentSkip to conversation

cfq_cic_link: fix? usage of wrong cfq_io_context

PATCH In review Oleg Nesterov 3 participants 3 messages Aug 20, 2006 – Aug 21, 2006 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cfq_cic_link: fix? usage of wrong cfq_io_context

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

block/cfq-iosched.c renamed from block/cfq-iosched.c~7_set +1 -1
@@ -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;
 		}
 
#1 lore raw

block/cfq-iosched.c restart: · line 1566

Quoted 5 lines · Oleg Nesterov
block/cfq-iosched.c renamed from block/cfq-iosched.c~7_set +1 -1
 		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.

Signature · 1 line
OGAWA Hirofumi <[email protected]>
#2 lore raw
In reply to Oleg Nesterov
Quoted 7 lines · Oleg Nesterov

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

block/cfq-iosched.c restart: · line 1566

Quoted 7 lines
block/cfq-iosched.c renamed from block/cfq-iosched.c~7_set +1 -1
@@ -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.

Signature · 1 line
Jens Axboe