Skip to content

Commit 5c4acbc

Browse files
alanskindKent Overstreet
authored andcommitted
bcachefs: Don't unlock the trans if ret doesn't match BCH_ERR_operation_blocked
Reported-by: [email protected] Signed-off-by: Alan Huang <[email protected]> Signed-off-by: Kent Overstreet <[email protected]>
1 parent 72c0d9c commit 5c4acbc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

fs/bcachefs/btree_update_interior.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1287,10 +1287,11 @@ bch2_btree_update_start(struct btree_trans *trans, struct btree_path *path,
12871287

12881288
do {
12891289
ret = bch2_btree_reserve_get(trans, as, nr_nodes, target, flags, &cl);
1290-
1290+
if (!bch2_err_matches(ret, BCH_ERR_operation_blocked))
1291+
break;
12911292
bch2_trans_unlock(trans);
12921293
bch2_wait_on_allocator(c, &cl);
1293-
} while (bch2_err_matches(ret, BCH_ERR_operation_blocked));
1294+
} while (1);
12941295
}
12951296

12961297
if (ret) {

0 commit comments

Comments
 (0)