Commit 5c4acbc8 authored by Alan Huang's avatar Alan Huang Committed by Kent Overstreet
Browse files

bcachefs: Don't unlock the trans if ret doesn't match BCH_ERR_operation_blocked

parent 72c0d9cb
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1287,10 +1287,11 @@ bch2_btree_update_start(struct btree_trans *trans, struct btree_path *path,

		do {
			ret = bch2_btree_reserve_get(trans, as, nr_nodes, target, flags, &cl);

			if (!bch2_err_matches(ret, BCH_ERR_operation_blocked))
				break;
			bch2_trans_unlock(trans);
			bch2_wait_on_allocator(c, &cl);
		} while (bch2_err_matches(ret, BCH_ERR_operation_blocked));
		} while (1);
	}

	if (ret) {