diff options
author | Brett Holman <bpholman5@gmail.com> | 2021-06-06 17:29:42 +0200 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 23:09:05 +0200 |
commit | ca47fa236278312e1931b303416a79863f80936b (patch) | |
tree | 5e1cff5d68e77aaf39d557d8fc9fd96230a3d185 /fs/bcachefs/replicas.c | |
parent | bcachefs: do not compile acl mod on minimal config (diff) | |
download | linux-ca47fa236278312e1931b303416a79863f80936b.tar.xz linux-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/bcachefs/replicas.c')
-rw-r--r-- | fs/bcachefs/replicas.c | 2 |
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]); |