Commit 00aad62a authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Fix incorrect initialization of btree_node_old_extent_overwrite()

b->level and b->btree_id weren't set when the code was checking
btree_node_is_extents()
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent c18dade6
...@@ -370,6 +370,9 @@ static struct btree *bch2_btree_node_alloc(struct btree_update *as, unsigned lev ...@@ -370,6 +370,9 @@ static struct btree *bch2_btree_node_alloc(struct btree_update *as, unsigned lev
set_btree_node_need_write(b); set_btree_node_need_write(b);
bch2_bset_init_first(b, &b->data->keys); bch2_bset_init_first(b, &b->data->keys);
b->c.level = level;
b->c.btree_id = as->btree_id;
memset(&b->nr, 0, sizeof(b->nr)); memset(&b->nr, 0, sizeof(b->nr));
b->data->magic = cpu_to_le64(bset_magic(c)); b->data->magic = cpu_to_le64(bset_magic(c));
b->data->flags = 0; b->data->flags = 0;
......
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