Commit 9a4a858c authored by Kent Overstreet's avatar Kent Overstreet
Browse files

bcachefs: Use bch2_kvmalloc() for journal keys array



We can hit this limit fairly easy when we have to reconstuct large
amounts of alloc info on large filesystems.

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent e5a3b8cf
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -288,7 +288,7 @@ int bch2_journal_key_insert_take(struct bch_fs *c, enum btree_id id,
			.size			= max_t(size_t, keys->size, 8) * 2,
		};

		new_keys.data = kvmalloc_array(new_keys.size, sizeof(new_keys.data[0]), GFP_KERNEL);
		new_keys.data = bch2_kvmalloc(new_keys.size * sizeof(new_keys.data[0]), GFP_KERNEL);
		if (!new_keys.data) {
			bch_err(c, "%s: error allocating new key array (size %zu)",
				__func__, new_keys.size);