mirror of
https://github.com/torvalds/linux.git
synced 2024-11-15 16:41:58 +00:00
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: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
01ed3359b2
commit
c6cf49a95a
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user