diff options
author | Slava Pestov <sviatoslavpestov@gmail.com> | 2014-07-18 00:53:34 -0700 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2016-10-07 09:00:37 -0800 |
commit | 61782103ce55dc32d4e56caf6b45613bcea57918 (patch) | |
tree | 6c9cf3e5132e32077aef7944ba59402d22a3586d | |
parent | fec6160fbf2f5b68b0a55351f87539d0614b1970 (diff) |
bcache: __cache_set_unregister() needs RCU lock
This fixes a lockdep warning.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
-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); |