bcachefs: Don't spin in journal reclaim

If we're not able to flush anything, we shouldn't keep looping.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
This commit is contained in:
Kent Overstreet
2022-02-25 22:45:58 -05:00
committed by Kent Overstreet
parent a0a07c59f5
commit 2975cd4701

View File

@@ -661,7 +661,7 @@ static int __bch2_journal_reclaim(struct journal *j, bool direct)
if (nr_flushed)
wake_up(&j->reclaim_wait);
} while ((min_nr || min_key_cache) && !direct);
} while ((min_nr || min_key_cache) && nr_flushed && !direct);
memalloc_noreclaim_restore(flags);