diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2020-12-06 16:29:13 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2020-12-19 21:59:10 -0500 |
commit | 3d5c7d36c94c5629aafc6be8a71992f7cda5976d (patch) | |
tree | cbcff0f8393ac417ad288683dddcc2384966ca0c | |
parent | c33aa8e331380b396fc0348e756b5c411a1548b2 (diff) |
bcachefs: Prevent journal reclaim from spinning
Without checking if we actually flushed anything, journal reclaim could
still go into an infinite loop while trying ot shut down.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
-rw-r--r-- | fs/bcachefs/journal_reclaim.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/journal_reclaim.c b/fs/bcachefs/journal_reclaim.c index 2319a2b6528e..b77d4e7f42d6 100644 --- a/fs/bcachefs/journal_reclaim.c +++ b/fs/bcachefs/journal_reclaim.c @@ -610,7 +610,7 @@ static int __bch2_journal_reclaim(struct journal *j, bool direct) else j->nr_background_reclaim += nr_flushed; trace_journal_reclaim_finish(c, nr_flushed); - } while (min_nr); + } while (min_nr && nr_flushed); memalloc_noreclaim_restore(flags); |