summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2011-07-12 20:10:37 -0700
committerColin Cross <ccross@android.com>2011-07-12 20:10:37 -0700
commit75c56a81116e51c5cf15c0641906d0745188cd16 (patch)
treec1d8e7def5bbb099a39d5e9ccfb13508ea5ca46a /block
parentb4294d618e8a19bb47826e51ae52b9fb2fe05f80 (diff)
parent620917de59eeb934b9f8cf35cc2d95c1ac8ed0fc (diff)
Merge commit 'v3.0-rc7' into android-3.0
Diffstat (limited to 'block')
-rw-r--r--block/cfq-iosched.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index f3799432676d..ae21919f15e1 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -2773,11 +2773,14 @@ static void __cfq_exit_single_io_context(struct cfq_data *cfqd,
smp_wmb();
cic->key = cfqd_dead_key(cfqd);
+ rcu_read_lock();
if (rcu_dereference(ioc->ioc_data) == cic) {
+ rcu_read_unlock();
spin_lock(&ioc->lock);
rcu_assign_pointer(ioc->ioc_data, NULL);
spin_unlock(&ioc->lock);
- }
+ } else
+ rcu_read_unlock();
if (cic->cfqq[BLK_RW_ASYNC]) {
cfq_exit_cfqq(cfqd, cic->cfqq[BLK_RW_ASYNC]);
@@ -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);