diff options
-rw-r--r-- | drivers/md/bcache/super.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c index cb7f524e4c01..67386f58dd14 100644 --- a/drivers/md/bcache/super.c +++ b/drivers/md/bcache/super.c @@ -1358,6 +1358,8 @@ static void __cache_set_unregister(struct closure *cl) mutex_lock(&bch_register_lock); + rcu_read_lock(); + radix_tree_for_each_slot(slot, &c->devices, &iter, 0) { d = radix_tree_deref_slot(slot); @@ -1370,6 +1372,8 @@ static void __cache_set_unregister(struct closure *cl) } } + rcu_read_unlock(); + mutex_unlock(&bch_register_lock); continue_at(cl, cache_set_flush, system_wq); |