summaryrefslogtreecommitdiff
path: root/drivers/md/bcache/btree_gc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/bcache/btree_gc.c')
-rw-r--r--drivers/md/bcache/btree_gc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/md/bcache/btree_gc.c b/drivers/md/bcache/btree_gc.c
index 886d3c3acd76..df814c07ee71 100644
--- a/drivers/md/bcache/btree_gc.c
+++ b/drivers/md/bcache/btree_gc.c
@@ -451,7 +451,7 @@ static void recalc_packed_keys(struct btree *b)
static void bch_coalesce_nodes(struct btree *old_nodes[GC_MERGE_NODES],
struct btree_iter *iter)
{
- struct btree *parent = iter->l[old_nodes[0]->level + 1].node;
+ struct btree *parent = iter_s(iter)->l[old_nodes[0]->level + 1].node;
struct cache_set *c = iter->c;
unsigned i, nr_old_nodes, nr_new_nodes, u64s = 0;
unsigned blocks = btree_blocks(c) * 2 / 3;
@@ -625,7 +625,7 @@ next:
BUG_ON(!bch_keylist_empty(&keylist));
- BUG_ON(iter->l[old_nodes[0]->level].node != old_nodes[0]);
+ BUG_ON(!btree_iter_has_node(iter_s(iter), old_nodes[0]));
BUG_ON(!bch_btree_iter_node_replace(iter, new_nodes[0]));
@@ -716,8 +716,8 @@ static int bch_coalesce_btree(struct cache_set *c, enum btree_id btree_id)
* and the nodes in our sliding window might not have the same
* parent anymore - blow away the sliding window:
*/
- if (iter.l[iter.level + 1].node &&
- !btree_node_intent_locked(&iter, iter.level + 1))
+ if (iter_s(&iter)->l[iter.level + 1].node &&
+ !btree_node_intent_locked(iter_s(&iter), iter.level + 1))
memset(merge + 1, 0,
(GC_MERGE_NODES - 1) * sizeof(merge[0]));
}