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/btree_iter.c | |
parent | 872c0311675bdb73b29ee74c7f27afc82d4918e9 (diff) | |
download | lwn-65d48e35250fe46a560dffa13876830336b152c9.tar.gz lwn-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/btree_iter.c')
-rw-r--r-- | fs/bcachefs/btree_iter.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/btree_iter.c b/fs/bcachefs/btree_iter.c index a1be6c81c3be..7b3e7f9368d1 100644 --- a/fs/bcachefs/btree_iter.c +++ b/fs/bcachefs/btree_iter.c @@ -1012,7 +1012,7 @@ retry_all: __btree_path_put(path, false); if (bch2_err_matches(ret, BCH_ERR_transaction_restart) || - ret == -ENOMEM) + bch2_err_matches(ret, ENOMEM)) goto retry_all; if (ret) goto err; @@ -2809,7 +2809,7 @@ void *__bch2_trans_kmalloc(struct btree_trans *trans, size_t size) } if (!new_mem) - return ERR_PTR(-ENOMEM); + return ERR_PTR(-BCH_ERR_ENOMEM_trans_kmalloc); trans->mem = new_mem; trans->mem_bytes = new_bytes; |