summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorBrett Holman <bpholman5@gmail.com>2021-06-06 09:29:42 -0600
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:09:05 -0400
commitca47fa236278312e1931b303416a79863f80936b (patch)
tree5e1cff5d68e77aaf39d557d8fc9fd96230a3d185 /fs
parent59e2480ff7360b5c6ecd418aee795a7087a3e8f6 (diff)
downloadlinux-stable-ca47fa236278312e1931b303416a79863f80936b.tar.gz
linux-stable-ca47fa236278312e1931b303416a79863f80936b.tar.bz2
linux-stable-ca47fa236278312e1931b303416a79863f80936b.zip
bcachefs: Fix unitialized use of a value
Signed-off-by: Brett Holman <bpholman5@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs')
-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 5a8b0a7b7197..64fdf53a630a 100644
--- a/fs/bcachefs/replicas.c
+++ b/fs/bcachefs/replicas.c
@@ -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]);