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

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2023-03-14 16:21:16 -04:00
parent b40901b0f7
commit 40a18fe273

View File

@ -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;