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>
This commit is contained in:
Kent Overstreet 2022-09-22 21:27:42 -04:00
parent afbc719468
commit d602657cd1

View File

@ -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);