summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2022-09-22 21:27:42 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:09:41 -0400
commitd602657cd185784bf4b227ecd1a88ed90735eae5 (patch)
treee6ce1f5b9f2aebc424adcb51b360d1965da0c9f0
parentafbc71946861902cfee7bee2b16c8e1570375e0e (diff)
bcachefs: Fix error handling in bch2_btree_update_start()
We were checking for -EAGAIN, but we're not returned that when we didn't pass a closure to wait with - oops. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r--fs/bcachefs/btree_update_interior.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/btree_update_interior.c b/fs/bcachefs/btree_update_interior.c
index 7028597358d5..0d87b1c88ed4 100644
--- a/fs/bcachefs/btree_update_interior.c
+++ b/fs/bcachefs/btree_update_interior.c
@@ -1110,8 +1110,8 @@ bch2_btree_update_start(struct btree_trans *trans, struct btree_path *path,
goto err;
ret = bch2_btree_reserve_get(trans, as, nr_nodes, flags, NULL);
- if (ret == -EAGAIN ||
- ret == -ENOMEM) {
+ if (bch2_err_matches(ret, ENOSPC) ||
+ bch2_err_matches(ret, ENOMEM)) {
struct closure cl;
closure_init_stack(&cl);