diff options
-rw-r--r-- | fs/bcachefs/btree_locking.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/bcachefs/btree_locking.c b/fs/bcachefs/btree_locking.c index 52ed0a46dff0..0047746405ab 100644 --- a/fs/bcachefs/btree_locking.c +++ b/fs/bcachefs/btree_locking.c @@ -271,8 +271,12 @@ static int lock_graph_descend(struct lock_graph *g, struct btree_trans *trans, if (unlikely(g->nr == ARRAY_SIZE(g->g))) { closure_put(&trans->ref); - if (orig_trans->lock_may_not_fail) + if (orig_trans->lock_may_not_fail) { + /* Other threads will have to rerun the cycle detector: */ + for (struct trans_waiting_for_lock *i = g->g + 1; i < g->g + g->nr; i++) + wake_up_process(i->trans->locking_wait.task); return 0; + } lock_graph_pop_all(g); |