diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-03-14 15:35:57 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:57 -0400 |
commit | 65d48e35250fe46a560dffa13876830336b152c9 (patch) | |
tree | 66141141933b02b33b6caa4f94118af4c782996a /fs/bcachefs/journal_sb.c | |
parent | 872c0311675bdb73b29ee74c7f27afc82d4918e9 (diff) | |
download | linux-65d48e35250fe46a560dffa13876830336b152c9.tar.gz linux-65d48e35250fe46a560dffa13876830336b152c9.tar.bz2 linux-65d48e35250fe46a560dffa13876830336b152c9.zip |
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/journal_sb.c')
-rw-r--r-- | fs/bcachefs/journal_sb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/journal_sb.c b/fs/bcachefs/journal_sb.c index 5be7882342e0..fcefbbe7eda8 100644 --- a/fs/bcachefs/journal_sb.c +++ b/fs/bcachefs/journal_sb.c @@ -33,7 +33,7 @@ static int bch2_sb_journal_validate(struct bch_sb *sb, b = kmalloc_array(nr, sizeof(u64), GFP_KERNEL); if (!b) - return -ENOMEM; + return -BCH_ERR_ENOMEM_sb_journal_validate; for (i = 0; i < nr; i++) b[i] = le64_to_cpu(journal->buckets[i]); @@ -116,7 +116,7 @@ static int bch2_sb_journal_v2_validate(struct bch_sb *sb, b = kmalloc_array(nr, sizeof(*b), GFP_KERNEL); if (!b) - return -ENOMEM; + return -BCH_ERR_ENOMEM_sb_journal_v2_validate; for (i = 0; i < nr; i++) { b[i].start = le64_to_cpu(journal->d[i].start); |