bcachefs: Don't unlock the trans if ret doesn't match BCH_ERR_operation_blocked
PATCH 1/1 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]>
--- fs/bcachefs/btree_update_interior.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
fs/bcachefs/btree_update_interior.c +3 -2
@@ -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) {
Signature · 1 line
2.48.1
Kent Overstreet
AppliedQuoted 2 lines · Alan Huang
Reported-by [email protected]Signed-off-by Alan Huang <[email protected]>
thanks! applied
Quoted 25 lines
--- fs/bcachefs/btree_update_interior.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)fs/bcachefs/btree_update_interior.c +3
-2@@ -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) {Signature · 1 line
2.48.1