diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-03-14 15:35:57 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-05-12 19:42:30 -0400 |
commit | 1e40d59b5340ca37edb87890db841f4a3ae72704 (patch) | |
tree | 8b2dcd06b2b8da690f2533729dba52063eb1fdf7 /fs/bcachefs/disk_groups.c | |
parent | 3911ad7ded65fa58169a4d6099eba92d1e7624f8 (diff) |
bcachefs: Private error codes: ENOMEM
This adds private error codes for most (but not all) of our ENOMEM uses,
which makes it easier to track down assorted allocation failures.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/disk_groups.c')
-rw-r--r-- | fs/bcachefs/disk_groups.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/disk_groups.c b/fs/bcachefs/disk_groups.c index fcd5dbff248d..1a8f8b3750da 100644 --- a/fs/bcachefs/disk_groups.c +++ b/fs/bcachefs/disk_groups.c @@ -68,7 +68,7 @@ static int bch2_sb_disk_groups_validate(struct bch_sb *sb, sorted = kmalloc_array(nr_groups, sizeof(*sorted), GFP_KERNEL); if (!sorted) - return -ENOMEM; + return -BCH_ERR_ENOMEM_disk_groups_validate; memcpy(sorted, groups->entries, nr_groups * sizeof(*sorted)); sort(sorted, nr_groups, sizeof(*sorted), group_cmp, NULL); @@ -134,7 +134,7 @@ int bch2_sb_disk_groups_to_cpu(struct bch_fs *c) cpu_g = kzalloc(sizeof(*cpu_g) + sizeof(cpu_g->entries[0]) * nr_groups, GFP_KERNEL); if (!cpu_g) - return -ENOMEM; + return -BCH_ERR_ENOMEM_disk_groups_to_cpu; cpu_g->nr = nr_groups; |