cfq-iosched: make code consistent
authorShaohua Li <shaohua.li@intel.com>
Mon, 27 Jun 2011 07:03:48 +0000 (09:03 +0200)
committerJens Axboe <jaxboe@fusionio.com>
Mon, 27 Jun 2011 07:36:06 +0000 (09:36 +0200)
ioc->ioc_data is rcu protectd, so uses correct API to access it.
This doesn't change any behavior, but just make code consistent.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Cc: stable@kernel.org # after ab4bd22d
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
block/cfq-iosched.c

index fd566c1e2617f8ff464defab7684ea865787655f..ae21919f15e1edf2ea6880efc6d5d43deae7fd9f 100644 (file)
@@ -3087,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);