]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
bcachefs: properly initialize used values
authorDan Robertson <dan@dlrobertson.com>
Sat, 15 May 2021 00:02:44 +0000 (20:02 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:03 +0000 (17:09 -0400)
commitd125615a4e22194dff9cecd12ec5a608f8c0f920
tree595668abd79b6e0c1fb295dce911a877e3171703
parente1036ce5810222620c98660d64ccc649652cf6c9
bcachefs: properly initialize used values

 - Ensure the second key value in bch_hash_info is initialized to zero
   if the info type is of type BCH_STR_HASH_SIPHASH.

 - Initialize the possibly returned value in bch2_inode_create. Assuming
   bch2_btree_iter_peek returns bkey_s_c_null, the uninitialized value
   of ret could be returned to the user as an error pointer.

 - Fix compiler warning in initialization of bkey_s_c_stripe

fs/bcachefs/buckets.c:1646:35: warning: suggest braces around initialization
of subobject [-Wmissing-braces]
        struct bkey_s_c_stripe new_s = { NULL };
                                         ^~~~

Signed-off-by: Dan Robertson <dan@dlrobertson.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/buckets.c
fs/bcachefs/inode.c
fs/bcachefs/str_hash.h