diff options
-rw-r--r-- | block/cfq-iosched.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 3c7b537bf908..545b8d4c829d 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c | |||
@@ -2772,8 +2772,11 @@ static void __cfq_exit_single_io_context(struct cfq_data *cfqd, | |||
2772 | smp_wmb(); | 2772 | smp_wmb(); |
2773 | cic->key = cfqd_dead_key(cfqd); | 2773 | cic->key = cfqd_dead_key(cfqd); |
2774 | 2774 | ||
2775 | if (ioc->ioc_data == cic) | 2775 | if (rcu_dereference(ioc->ioc_data) == cic) { |
2776 | spin_lock(&ioc->lock); | ||
2776 | rcu_assign_pointer(ioc->ioc_data, NULL); | 2777 | rcu_assign_pointer(ioc->ioc_data, NULL); |
2778 | spin_unlock(&ioc->lock); | ||
2779 | } | ||
2777 | 2780 | ||
2778 | if (cic->cfqq[BLK_RW_ASYNC]) { | 2781 | if (cic->cfqq[BLK_RW_ASYNC]) { |
2779 | cfq_exit_cfqq(cfqd, cic->cfqq[BLK_RW_ASYNC]); | 2782 | cfq_exit_cfqq(cfqd, cic->cfqq[BLK_RW_ASYNC]); |