Commit 34b8e552 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Fix a deadlock

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent cf0517af
...@@ -1550,7 +1550,13 @@ void bch2_btree_insert_node(struct btree_update *as, struct btree *b, ...@@ -1550,7 +1550,13 @@ void bch2_btree_insert_node(struct btree_update *as, struct btree *b,
btree_node_interior_verify(b); btree_node_interior_verify(b);
bch2_foreground_maybe_merge(c, iter, b->level, flags); /*
* when called from the btree_split path the new nodes aren't added to
* the btree iterator yet, so the merge path's unlock/wait/relock dance
* won't work:
*/
bch2_foreground_maybe_merge(c, iter, b->level,
flags|BTREE_INSERT_NOUNLOCK);
return; return;
split: split:
btree_split(as, b, iter, keys, flags); btree_split(as, b, iter, keys, flags);
......
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