mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
bcachefs: Fix flushing held btree writes when there's a fs error
Previously, we'd go into an infinite loop. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
f38fe2dc5d
commit
ae93a62895
1 changed files with 3 additions and 0 deletions
|
@ -1438,6 +1438,9 @@ static bool flush_held_btree_writes(struct bch_fs *c)
|
|||
cond_resched();
|
||||
nodes_unwritten = false;
|
||||
|
||||
if (bch2_journal_error(&c->journal))
|
||||
return true;
|
||||
|
||||
rcu_read_lock();
|
||||
for_each_cached_btree(b, c, tbl, i, pos)
|
||||
if (btree_node_need_write(b)) {
|
||||
|
|
Loading…
Reference in a new issue