mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-08 15:04:45 +00:00
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: Kent Overstreet <kent.overstreet@gmail.com>
This commit is contained in:
parent
0c10cf8525
commit
25a7723182
@ -2988,6 +2988,8 @@ void bch2_trans_begin(struct btree_trans *trans)
|
||||
}
|
||||
|
||||
trans_for_each_path(trans, path) {
|
||||
path->should_be_locked = false;
|
||||
|
||||
/*
|
||||
* XXX: we probably shouldn't be doing this if the transaction
|
||||
* was restarted, but currently we still overflow transaction
|
||||
@ -2996,7 +2998,7 @@ void bch2_trans_begin(struct btree_trans *trans)
|
||||
if (!path->ref && !path->preserve)
|
||||
__bch2_path_free(trans, path);
|
||||
else
|
||||
path->preserve = path->should_be_locked = false;
|
||||
path->preserve = false;
|
||||
}
|
||||
|
||||
bch2_trans_cond_resched(trans);
|
||||
|
Loading…
Reference in New Issue
Block a user