mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
bcachefs: Fix a deadlock
btree_node_lock_increment() was incorrectly skipping over the current iter when checking if we should increment a node we already have locked. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
2c480a7102
commit
bbe65614b7
1 changed files with 1 additions and 2 deletions
|
@ -164,8 +164,7 @@ static inline bool btree_node_lock_increment(struct btree_iter *iter,
|
|||
struct btree_iter *linked;
|
||||
|
||||
trans_for_each_iter(iter->trans, linked)
|
||||
if (linked != iter &&
|
||||
linked->l[level].b == b &&
|
||||
if (linked->l[level].b == b &&
|
||||
btree_node_locked_type(linked, level) >= want) {
|
||||
six_lock_increment(&b->c.lock, want);
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue