diff options
| author | Alan Huang <mmpgouride@gmail.com> | 2024-10-03 03:06:30 +0800 |
|---|---|---|
| committer | Kent Overstreet <kent.overstreet@linux.dev> | 2025-01-14 10:45:08 -0500 |
| commit | b5c3dcd0db0452b13a4799b9c2be751e75b541f9 (patch) | |
| tree | 98c6b0499acdaa02b389da55b2bdd819d663582a | |
| parent | 0ef9ab34f442f7236b5a84a6691959c67639f8b9 (diff) | |
bcachefs: Convert open-coded lock_graph_pop_all to helper
Signed-off-by: Alan Huang <mmpgouride@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
| -rw-r--r-- | fs/bcachefs/btree_locking.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/bcachefs/btree_locking.c b/fs/bcachefs/btree_locking.c index 771d531d6533..8174799dd4b3 100644 --- a/fs/bcachefs/btree_locking.c +++ b/fs/bcachefs/btree_locking.c @@ -229,8 +229,7 @@ static noinline int break_cycle(struct lock_graph *g, struct printbuf *cycle) ret = abort_lock(g, abort); out: if (ret) - while (g->nr) - lock_graph_up(g); + lock_graph_pop_all(g); return ret; } @@ -252,8 +251,7 @@ static int lock_graph_descend(struct lock_graph *g, struct btree_trans *trans, if (orig_trans->lock_may_not_fail) return 0; - while (g->nr) - lock_graph_up(g); + lock_graph_pop_all(g); if (cycle) return 0; |
