diff --git a/fs/bcachefs/btree_iter.c b/fs/bcachefs/btree_iter.c index c03a7de19f78..d9ce82e04e76 100644 --- a/fs/bcachefs/btree_iter.c +++ b/fs/bcachefs/btree_iter.c @@ -2299,6 +2299,7 @@ void *bch2_trans_kmalloc(struct btree_trans *trans, size_t size) p = trans->mem + trans->mem_top; trans->mem_top += size; + memset(p, 0, size); return p; }