Commit c6cf49a9 authored by Kent Overstreet's avatar Kent Overstreet

bcachefs: Fix blocking with locks held

This is a major oopsy - we should always be unlocking before calling
closure_sync(), else we'll cause a deadlock.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 01ed3359
......@@ -1117,10 +1117,10 @@ bch2_btree_update_start(struct btree_trans *trans, struct btree_path *path,
closure_init_stack(&cl);
bch2_trans_unlock(trans);
do {
ret = bch2_btree_reserve_get(trans, as, nr_nodes, flags, &cl);
bch2_trans_unlock(trans);
closure_sync(&cl);
} while (ret == -EAGAIN);
}
......
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