]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
bcachefs: Fix an uninitialized var
authorKent Overstreet <kent.overstreet@gmail.com>
Fri, 21 May 2021 00:47:27 +0000 (20:47 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:04 +0000 (17:09 -0400)
this fixes a valgrind complaint

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
fs/bcachefs/btree_update_interior.c

index ea522b4583fd0cfa7c9d4f83e1be7e4083821b20..ea1b09b36059196e8a1436320de86165aac8085d 100644 (file)
@@ -286,6 +286,7 @@ static struct btree *bch2_btree_node_alloc(struct btree_update *as, unsigned lev
 
        memset(&b->nr, 0, sizeof(b->nr));
        b->data->magic = cpu_to_le64(bset_magic(c));
+       memset(&b->data->_ptr, 0, sizeof(b->data->_ptr));
        b->data->flags = 0;
        SET_BTREE_NODE_ID(b->data, as->btree_id);
        SET_BTREE_NODE_LEVEL(b->data, level);