]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
bcachefs: Initialize btree_node flags field in bch2_btree_root_alloc.
authorJustin Husted <sigstop@gmail.com>
Sat, 12 Oct 2019 00:56:27 +0000 (17:56 -0700)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:30 +0000 (17:08 -0400)
Valgrind data indicated that the flags field was only partially
initialized when written to disk.

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

index 3b134d3a998453b819d58082c3cc5d47df51df79..0956957216f91a1b8b403eb3d462a98766407198 100644 (file)
@@ -2187,6 +2187,7 @@ void bch2_btree_root_alloc(struct bch_fs *c, enum btree_id id)
        bch2_bset_init_first(b, &b->data->keys);
        bch2_btree_build_aux_trees(b);
 
+       b->data->flags = 0;
        b->data->min_key = POS_MIN;
        b->data->max_key = POS_MAX;
        b->data->format = bch2_btree_calc_format(b);