From 5dd21b27121985cef0642d0cb89cfd749393b727 Mon Sep 17 00:00:00 2001 From: Alan Huang Date: Thu, 3 Oct 2024 03:06:33 +0800 Subject: [PATCH] bcachefs: Pop all the transactions from the abort one The transaction is going to abort, so there will be no cycle involving this transaction anymore. Signed-off-by: Alan Huang Signed-off-by: Kent Overstreet --- fs/bcachefs/btree_locking.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/bcachefs/btree_locking.c b/fs/bcachefs/btree_locking.c index 15ef9f71ca43..10b805a60f52 100644 --- a/fs/bcachefs/btree_locking.c +++ b/fs/bcachefs/btree_locking.c @@ -242,6 +242,8 @@ static noinline int break_cycle(struct lock_graph *g, struct printbuf *cycle, out: if (ret) lock_graph_pop_all(g); + else + lock_graph_pop_from(g, abort); return ret; } -- 2.25.1