Commit 40a18fe2 authored by Kent Overstreet's avatar Kent Overstreet

bcachefs: Add error message for failing to allocate sorted journal keys

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent b40901b0
......@@ -502,8 +502,11 @@ static int journal_keys_sort(struct bch_fs *c)
keys->size = roundup_pow_of_two(nr_keys);
keys->d = kvmalloc_array(keys->size, sizeof(keys->d[0]), GFP_KERNEL);
if (!keys->d)
if (!keys->d) {
bch_err(c, "Failed to allocate buffer for sorted journal keys (%zu keys)",
nr_keys);
return -BCH_ERR_ENOMEM_journal_keys_sort;
}
genradix_for_each(&c->journal_entries, iter, _i) {
i = *_i;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment