diff options
author | Slava Pestov <sp@daterainc.com> | 2014-04-29 22:39:27 (GMT) |
---|---|---|
committer | Kent Overstreet <kmo@daterainc.com> | 2014-08-04 22:23:03 (GMT) |
commit | e5112201c1285841f8b565ece5d6ae7e0d7947a2 (patch) | |
tree | 6468d44f5424918ab138a7b9de00be259873ae3e /drivers/md/bcache | |
parent | 8b326d3a2a76912dfed2f0ab937d59fae9512ca2 (diff) | |
download | linux-e5112201c1285841f8b565ece5d6ae7e0d7947a2.tar.xz |
bcache: fix lockdep warnings on shutdown
Diffstat (limited to 'drivers/md/bcache')
-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 1ea9fa2..09573c2 100644 --- a/drivers/md/bcache/super.c +++ b/drivers/md/bcache/super.c @@ -1214,7 +1214,9 @@ void bch_flash_dev_release(struct kobject *kobj) static void flash_dev_free(struct closure *cl) { struct bcache_device *d = container_of(cl, struct bcache_device, cl); + mutex_lock(&bch_register_lock); bcache_device_free(d); + mutex_unlock(&bch_register_lock); kobject_put(&d->kobj); } @@ -1222,7 +1224,9 @@ static void flash_dev_flush(struct closure *cl) { struct bcache_device *d = container_of(cl, struct bcache_device, cl); + mutex_lock(&bch_register_lock); bcache_device_unlink(d); + mutex_unlock(&bch_register_lock); kobject_del(&d->kobj); continue_at(cl, flash_dev_free, system_wq); } |