Commit 6751c1e3 authored by Joe Perches's avatar Joe Perches Committed by Jens Axboe

bcache: Avoid comma separated statements

Use semicolons and braces.
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarColy Li <colyli@suse.de>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent afe78ab4
...@@ -712,8 +712,10 @@ void bch_bset_build_written_tree(struct btree_keys *b) ...@@ -712,8 +712,10 @@ void bch_bset_build_written_tree(struct btree_keys *b)
for (j = inorder_next(0, t->size); for (j = inorder_next(0, t->size);
j; j;
j = inorder_next(j, t->size)) { j = inorder_next(j, t->size)) {
while (bkey_to_cacheline(t, k) < cacheline) while (bkey_to_cacheline(t, k) < cacheline) {
prev = k, k = bkey_next(k); prev = k;
k = bkey_next(k);
}
t->prev[j] = bkey_u64s(prev); t->prev[j] = bkey_u64s(prev);
t->tree[j].m = bkey_to_cacheline_offset(t, cacheline++, k); t->tree[j].m = bkey_to_cacheline_offset(t, cacheline++, k);
...@@ -901,8 +903,10 @@ unsigned int bch_btree_insert_key(struct btree_keys *b, struct bkey *k, ...@@ -901,8 +903,10 @@ unsigned int bch_btree_insert_key(struct btree_keys *b, struct bkey *k,
status = BTREE_INSERT_STATUS_INSERT; status = BTREE_INSERT_STATUS_INSERT;
while (m != bset_bkey_last(i) && while (m != bset_bkey_last(i) &&
bkey_cmp(k, b->ops->is_extents ? &START_KEY(m) : m) > 0) bkey_cmp(k, b->ops->is_extents ? &START_KEY(m) : m) > 0) {
prev = m, m = bkey_next(m); prev = m;
m = bkey_next(m);
}
/* prev is in the tree, if we merge we're done */ /* prev is in the tree, if we merge we're done */
status = BTREE_INSERT_STATUS_BACK_MERGE; status = BTREE_INSERT_STATUS_BACK_MERGE;
......
...@@ -1094,8 +1094,10 @@ SHOW(__bch_cache) ...@@ -1094,8 +1094,10 @@ SHOW(__bch_cache)
--n; --n;
while (cached < p + n && while (cached < p + n &&
*cached == BTREE_PRIO) *cached == BTREE_PRIO) {
cached++, n--; cached++;
n--;
}
for (i = 0; i < n; i++) for (i = 0; i < n; i++)
sum += INITIAL_PRIO - cached[i]; sum += INITIAL_PRIO - cached[i];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment