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
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user