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: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2020-02-26 17:11:00 -05:00 committed by Kent Overstreet
parent c18dade658
commit 00aad62aaf

View file

@ -370,6 +370,9 @@ static struct btree *bch2_btree_node_alloc(struct btree_update *as, unsigned lev
set_btree_node_need_write(b);
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));
b->data->magic = cpu_to_le64(bset_magic(c));
b->data->flags = 0;