summaryrefslogtreecommitdiffstats
path: root/drivers/md/bcache/super.c
diff options
context:
space:
mode:
authorKent Overstreet <kmo@daterainc.com>2013-07-24 17:27:07 -0700
committerKent Overstreet <kmo@daterainc.com>2013-11-10 21:56:03 -0800
commite8e1d4682c8cb06dbcb5ef7bb851bf9bcb889c84 (patch)
tree8e2287b8e21ccb51518b7e2e9d54ab9b4714b7bb /drivers/md/bcache/super.c
parent0b93207abb40d3c42bb83eba1e1e7edc1da77810 (diff)
downloadop-kernel-dev-e8e1d4682c8cb06dbcb5ef7bb851bf9bcb889c84.zip
op-kernel-dev-e8e1d4682c8cb06dbcb5ef7bb851bf9bcb889c84.tar.gz
bcache: Convert try_wait to wait_queue_head_t
We never waited on c->try_wait asynchronously, so just use the standard primitives. Signed-off-by: Kent Overstreet <kmo@daterainc.com>
Diffstat (limited to 'drivers/md/bcache/super.c')
-rw-r--r--drivers/md/bcache/super.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c
index d3169c0..9a164cd 100644
--- a/drivers/md/bcache/super.c
+++ b/drivers/md/bcache/super.c
@@ -1436,12 +1436,14 @@ struct cache_set *bch_cache_set_alloc(struct cache_sb *sb)
c->sort_crit_factor = int_sqrt(c->btree_pages);
- mutex_init(&c->bucket_lock);
- mutex_init(&c->sort_lock);
- spin_lock_init(&c->sort_time_lock);
closure_init_unlocked(&c->sb_write);
+ mutex_init(&c->bucket_lock);
+ init_waitqueue_head(&c->try_wait);
closure_init_unlocked(&c->uuid_write);
+ spin_lock_init(&c->sort_time_lock);
+ mutex_init(&c->sort_lock);
spin_lock_init(&c->btree_read_time_lock);
+
bch_moving_init_cache_set(c);
INIT_LIST_HEAD(&c->list);
@@ -1529,7 +1531,7 @@ static void run_cache_set(struct cache_set *c)
goto err;
err = "error reading btree root";
- c->root = bch_btree_node_get(c, k, j->btree_level, &op);
+ c->root = bch_btree_node_get(c, k, j->btree_level, true);
if (IS_ERR_OR_NULL(c->root))
goto err;
OpenPOWER on IntegriCloud