Commit ae93a628 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Fix flushing held btree writes when there's a fs error

Previously, we'd go into an infinite loop.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent f38fe2dc
...@@ -1438,6 +1438,9 @@ static bool flush_held_btree_writes(struct bch_fs *c) ...@@ -1438,6 +1438,9 @@ static bool flush_held_btree_writes(struct bch_fs *c)
cond_resched(); cond_resched();
nodes_unwritten = false; nodes_unwritten = false;
if (bch2_journal_error(&c->journal))
return true;
rcu_read_lock(); rcu_read_lock();
for_each_cached_btree(b, c, tbl, i, pos) for_each_cached_btree(b, c, tbl, i, pos)
if (btree_node_need_write(b)) { if (btree_node_need_write(b)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment