diff options
Diffstat (limited to 'block/ll_rw_blk.c')
-rw-r--r-- | block/ll_rw_blk.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c index caa8fcf5474b..6dc769182052 100644 --- a/block/ll_rw_blk.c +++ b/block/ll_rw_blk.c | |||
@@ -3477,10 +3477,12 @@ void put_io_context(struct io_context *ioc) | |||
3477 | BUG_ON(atomic_read(&ioc->refcount) == 0); | 3477 | BUG_ON(atomic_read(&ioc->refcount) == 0); |
3478 | 3478 | ||
3479 | if (atomic_dec_and_test(&ioc->refcount)) { | 3479 | if (atomic_dec_and_test(&ioc->refcount)) { |
3480 | rcu_read_lock(); | ||
3480 | if (ioc->aic && ioc->aic->dtor) | 3481 | if (ioc->aic && ioc->aic->dtor) |
3481 | ioc->aic->dtor(ioc->aic); | 3482 | ioc->aic->dtor(ioc->aic); |
3482 | if (ioc->cic && ioc->cic->dtor) | 3483 | if (ioc->cic && ioc->cic->dtor) |
3483 | ioc->cic->dtor(ioc->cic); | 3484 | ioc->cic->dtor(ioc->cic); |
3485 | rcu_read_unlock(); | ||
3484 | 3486 | ||
3485 | kmem_cache_free(iocontext_cachep, ioc); | 3487 | kmem_cache_free(iocontext_cachep, ioc); |
3486 | } | 3488 | } |