diff options
author | Slava Pestov <sviatoslavpestov@gmail.com> | 2014-07-18 00:53:34 -0700 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2017-01-18 20:21:14 -0900 |
commit | 614aaaf8c117dcb6de781a30d1accf60f07d8050 (patch) | |
tree | 6a6fa53efe852a9adf0edba39a870e1ac08b8864 | |
parent | e2216e20d58d4a7cc4787922e652e2559f4534c7 (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); |