bcachefs: Fix unitialized use of a value

Signed-off-by: Brett Holman <bpholman5@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Brett Holman 2021-06-06 09:29:42 -06:00 committed by Kent Overstreet
parent 59e2480ff7
commit ca47fa2362

View file

@ -442,6 +442,8 @@ static int __bch2_mark_bkey_replicas(struct bch_fs *c, struct bkey_s_c k,
unsigned i;
int ret;
memset(&search, 0, sizeof(search));
for (i = 0; i < cached.nr; i++) {
bch2_replicas_entry_cached(&search.e, cached.devs[i]);