aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/bcache/debug.c
diff options
context:
space:
mode:
authorKent Overstreet <kmo@daterainc.com>2013-12-16 18:27:25 -0500
committerKent Overstreet <kmo@daterainc.com>2014-01-08 16:05:08 -0500
commitcb7a583e6a6ace661a5890803e115d2292a293df (patch)
treebe695468938237320560fc75b0f4b64cbe60117a /drivers/md/bcache/debug.c
parenta5ae4300c15c778722c139953c825cd24d6ff517 (diff)
bcache: kill closure locking usage
Signed-off-by: Kent Overstreet <kmo@daterainc.com>
Diffstat (limited to 'drivers/md/bcache/debug.c')
-rw-r--r--drivers/md/bcache/debug.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/md/bcache/debug.c b/drivers/md/bcache/debug.c
index 03cb4d114e16..fab3767d6d28 100644
--- a/drivers/md/bcache/debug.c
+++ b/drivers/md/bcache/debug.c
@@ -127,9 +127,7 @@ void bch_btree_verify(struct btree *b, struct bset *new)
127 if (!b->c->verify) 127 if (!b->c->verify)
128 return; 128 return;
129 129
130 closure_wait_event(&b->io.wait, &cl, 130 down(&b->io_mutex);
131 atomic_read(&b->io.cl.remaining) == -1);
132
133 mutex_lock(&b->c->verify_lock); 131 mutex_lock(&b->c->verify_lock);
134 132
135 bkey_copy(&v->key, &b->key); 133 bkey_copy(&v->key, &b->key);
@@ -137,8 +135,6 @@ void bch_btree_verify(struct btree *b, struct bset *new)
137 v->level = b->level; 135 v->level = b->level;
138 136
139 bch_btree_node_read(v); 137 bch_btree_node_read(v);
140 closure_wait_event(&v->io.wait, &cl,
141 atomic_read(&b->io.cl.remaining) == -1);
142 138
143 if (new->keys != v->sets[0].data->keys || 139 if (new->keys != v->sets[0].data->keys ||
144 memcmp(new->start, 140 memcmp(new->start,
@@ -167,6 +163,7 @@ void bch_btree_verify(struct btree *b, struct bset *new)
167 } 163 }
168 164
169 mutex_unlock(&b->c->verify_lock); 165 mutex_unlock(&b->c->verify_lock);
166 up(&b->io_mutex);
170} 167}
171 168
172void bch_data_verify(struct cached_dev *dc, struct bio *bio) 169void bch_data_verify(struct cached_dev *dc, struct bio *bio)