mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
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:
parent
c18dade658
commit
00aad62aaf
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue