summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrett Holman <bpholman5@gmail.com>2021-06-06 09:29:42 -0600
committerBrett Holman <bpholman5@gmail.com>2021-06-06 09:31:24 -0600
commitdccf85f31f0fd5566dfa6a590a3eef5d0d08aaf5 (patch)
treef84601578d9529871dd003525ac6837840c711c7
parent4644baed0a380495367fcda713be3973ad081187 (diff)
bcachefs: Fix unitialized use of a value
-rw-r--r--fs/bcachefs/replicas.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/bcachefs/replicas.c b/fs/bcachefs/replicas.c
index 8e6cccd39383..dbbbcc6dcec6 100644
--- a/fs/bcachefs/replicas.c
+++ b/fs/bcachefs/replicas.c
@@ -435,6 +435,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]);