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-07 11:50:45 -0500 |
commit | bc45fb75de137a43afd1681bf6edf9d192c95364 (patch) | |
tree | f4a4521d0477bdc6b1278bb21cec52cfdf07aeed | |
parent | 4971404d0fe08b7da173b488e24b27c4f469dada (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); |