bcachefs: fix a replicas bug

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2018-11-09 00:55:20 -05:00 committed by Kent Overstreet
parent a420eea689
commit 82ebd49cd6

View File

@ -267,6 +267,8 @@ int bch2_mark_bkey_replicas(struct bch_fs *c,
struct bch_replicas_entry_padded search;
int ret;
memset(&search, 0, sizeof(search));
if (type == BKEY_TYPE_EXTENTS) {
struct bch_devs_list cached = bch2_bkey_cached_devs(k);
unsigned i;
@ -564,6 +566,8 @@ bool bch2_bkey_replicas_marked(struct bch_fs *c,
struct bch_replicas_entry_padded search;
bool ret;
memset(&search, 0, sizeof(search));
if (type == BKEY_TYPE_EXTENTS) {
struct bch_devs_list cached = bch2_bkey_cached_devs(k);
unsigned i;