Skip to contentSkip to conversation

cfq-iosched: make code consistent

PATCH Applied Shaohua Li 2 participants 2 messages Jun 27, 2011 Block layer

lore
Share & tools
lore

Shaohua Li

author
#0 lore raw

PATCH 2/2 cfq-iosched: make code consistent

ioc->ioc_data is rcu protectd, so uses correct API to access it. This doesn't change any behavior, but just make code consistent.

block/cfq-iosched.c +2 -1
index f379943..ae21919 100644
@@ -3084,7 +3087,8 @@ cfq_drop_dead_cic(struct cfq_data *cfqd, struct io_context *ioc,
 
 	spin_lock_irqsave(&ioc->lock, flags);
 
-	BUG_ON(ioc->ioc_data == cic);
+	BUG_ON(rcu_dereference_check(ioc->ioc_data,
+		lockdep_is_held(&ioc->lock)) == cic);
 
 	radix_tree_delete(&ioc->radix_root, cfqd->cic_index);
 	hlist_del_rcu(&cic->cic_list);
Applied
#1 lore raw
Quoted 2 lines · Shaohua Li

ioc->ioc_data is rcu protectd, so uses correct API to access it. This doesn't change any behavior, but just make code consistent.

Thanks, applied both of these.

Signature · 1 line
Jens Axboe