* [patch 2/2]cfq-iosched: make code consistent
@ 2011-06-27 6:52 Shaohua Li
2011-06-27 7:01 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Shaohua Li @ 2011-06-27 6:52 UTC (permalink / raw)
To: lkml; +Cc: Jens Axboe
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>
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index f379943..ae21919 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -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);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch 2/2]cfq-iosched: make code consistent
2011-06-27 6:52 [patch 2/2]cfq-iosched: make code consistent Shaohua Li
@ 2011-06-27 7:01 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2011-06-27 7:01 UTC (permalink / raw)
To: Shaohua Li; +Cc: lkml
On 2011-06-27 08:52, Shaohua Li wrote:
> 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.
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-06-27 7:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-27 6:52 [patch 2/2]cfq-iosched: make code consistent Shaohua Li
2011-06-27 7:01 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox