Commit 25a77231 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Always clear should_be_locked in bch2_trans_begin()

bch2_trans_begin() invalidates all iterators, until they're revalidated
by calling peek() or traverse().
Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
parent 0c10cf85
...@@ -2988,6 +2988,8 @@ void bch2_trans_begin(struct btree_trans *trans) ...@@ -2988,6 +2988,8 @@ void bch2_trans_begin(struct btree_trans *trans)
} }
trans_for_each_path(trans, path) { trans_for_each_path(trans, path) {
path->should_be_locked = false;
/* /*
* XXX: we probably shouldn't be doing this if the transaction * XXX: we probably shouldn't be doing this if the transaction
* was restarted, but currently we still overflow transaction * was restarted, but currently we still overflow transaction
...@@ -2996,7 +2998,7 @@ void bch2_trans_begin(struct btree_trans *trans) ...@@ -2996,7 +2998,7 @@ void bch2_trans_begin(struct btree_trans *trans)
if (!path->ref && !path->preserve) if (!path->ref && !path->preserve)
__bch2_path_free(trans, path); __bch2_path_free(trans, path);
else else
path->preserve = path->should_be_locked = false; path->preserve = false;
} }
bch2_trans_cond_resched(trans); bch2_trans_cond_resched(trans);
......
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