Commit 2975cd47 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Don't spin in journal reclaim

If we're not able to flush anything, we shouldn't keep looping.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
parent a0a07c59
...@@ -661,7 +661,7 @@ static int __bch2_journal_reclaim(struct journal *j, bool direct) ...@@ -661,7 +661,7 @@ static int __bch2_journal_reclaim(struct journal *j, bool direct)
if (nr_flushed) if (nr_flushed)
wake_up(&j->reclaim_wait); 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); memalloc_noreclaim_restore(flags);
......
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