Commit d602657c authored by Kent Overstreet's avatar Kent Overstreet

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: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent afbc7194
...@@ -1110,8 +1110,8 @@ bch2_btree_update_start(struct btree_trans *trans, struct btree_path *path, ...@@ -1110,8 +1110,8 @@ bch2_btree_update_start(struct btree_trans *trans, struct btree_path *path,
goto err; goto err;
ret = bch2_btree_reserve_get(trans, as, nr_nodes, flags, NULL); ret = bch2_btree_reserve_get(trans, as, nr_nodes, flags, NULL);
if (ret == -EAGAIN || if (bch2_err_matches(ret, ENOSPC) ||
ret == -ENOMEM) { bch2_err_matches(ret, ENOMEM)) {
struct closure cl; struct closure cl;
closure_init_stack(&cl); closure_init_stack(&cl);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment