diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-03-14 20:35:57 +0100 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 23:09:57 +0200 |
commit | 65d48e35250fe46a560dffa13876830336b152c9 (patch) | |
tree | 66141141933b02b33b6caa4f94118af4c782996a /fs/bcachefs/checksum.c | |
parent | bcachefs: Fix bch2_check_extents_to_backpointers() (diff) | |
download | linux-65d48e35250fe46a560dffa13876830336b152c9.tar.xz 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/checksum.c')
-rw-r--r-- | fs/bcachefs/checksum.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/checksum.c b/fs/bcachefs/checksum.c index 43d22fe8131b..843e138862f6 100644 --- a/fs/bcachefs/checksum.c +++ b/fs/bcachefs/checksum.c @@ -133,7 +133,7 @@ static inline int do_encrypt(struct crypto_sync_skcipher *tfm, sg = kmalloc_array(pages, sizeof(*sg), GFP_KERNEL); if (!sg) - return -ENOMEM; + return -BCH_ERR_ENOMEM_do_encrypt; sg_init_table(sg, pages); @@ -648,7 +648,7 @@ int bch2_enable_encryption(struct bch_fs *c, bool keyed) crypt = bch2_sb_resize_crypt(&c->disk_sb, sizeof(*crypt) / sizeof(u64)); if (!crypt) { - ret = -ENOMEM; /* XXX this technically could be -ENOSPC */ + ret = -BCH_ERR_ENOSPC_sb_crypt; goto err; } |