summaryrefslogtreecommitdiff
path: root/fs/bcachefs/btree_locking.c
diff options
context:
space:
mode:
authorAlan Huang <mmpgouride@gmail.com>2024-10-03 03:06:33 +0800
committerKent Overstreet <kent.overstreet@linux.dev>2025-01-14 10:45:25 -0500
commit5dd21b27121985cef0642d0cb89cfd749393b727 (patch)
tree78b9d63a12a29701e825362ca59b8bcf0c115b4d /fs/bcachefs/btree_locking.c
parentb169138d482980d31207c2d1706a2be2529978cf (diff)
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 <mmpgouride@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/btree_locking.c')
-rw-r--r--fs/bcachefs/btree_locking.c2
1 files changed, 2 insertions, 0 deletions
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;
}