Commit 5ae6f330 authored by Kent Overstreet's avatar Kent Overstreet
Browse files

bcachefs: zero init journal bios



fix a kmsan splat

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 9ea24b28
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1510,7 +1510,7 @@ int bch2_dev_journal_init(struct bch_dev *ca, struct bch_sb *sb)
	unsigned nr_bvecs = DIV_ROUND_UP(JOURNAL_ENTRY_SIZE_MAX, PAGE_SIZE);

	for (unsigned i = 0; i < ARRAY_SIZE(ja->bio); i++) {
		ja->bio[i] = kmalloc(struct_size(ja->bio[i], bio.bi_inline_vecs,
		ja->bio[i] = kzalloc(struct_size(ja->bio[i], bio.bi_inline_vecs,
				     nr_bvecs), GFP_KERNEL);
		if (!ja->bio[i])
			return -BCH_ERR_ENOMEM_dev_journal_init;