diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-03-14 16:21:16 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-03-14 20:27:44 -0400 |
commit | 865ac6d250fa579ad78e109aadde2dbc01723c9b (patch) | |
tree | 27ac5bfa945fcd67f6f6b1d15533959f12420dfb | |
parent | 2377cd8d5f32d320a7224c3ccf385d715cbc2d37 (diff) |
bcachefs: Add error message for failing to allocate sorted journal keys
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r-- | fs/bcachefs/recovery.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/bcachefs/recovery.c b/fs/bcachefs/recovery.c index 137e523bb7ea..73f7663cbd3f 100644 --- a/fs/bcachefs/recovery.c +++ b/fs/bcachefs/recovery.c @@ -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; |