mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-04 09:59:32 +00:00
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> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
f51e84fe24
commit
b18df768eb
1 changed files with 1 additions and 1 deletions
|
@ -610,7 +610,7 @@ static int __bch2_journal_reclaim(struct journal *j, bool direct)
|
||||||
else
|
else
|
||||||
j->nr_background_reclaim += nr_flushed;
|
j->nr_background_reclaim += nr_flushed;
|
||||||
trace_journal_reclaim_finish(c, nr_flushed);
|
trace_journal_reclaim_finish(c, nr_flushed);
|
||||||
} while (min_nr);
|
} while (min_nr && nr_flushed);
|
||||||
|
|
||||||
memalloc_noreclaim_restore(flags);
|
memalloc_noreclaim_restore(flags);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue