Commit cb598111 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Fix journal_flush_done()

journal_flush_done() was overwriting did_work, thus occasionally
returning false when it did do work and occasional assertions in the
shutdown sequence because we didn't completely flush the key cache.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
parent fa8e94fa
......@@ -759,7 +759,8 @@ static int journal_flush_done(struct journal *j, u64 seq_to_flush,
mutex_lock(&j->reclaim_lock);
*did_work = journal_flush_pins(j, seq_to_flush, 0, 0) != 0;
if (journal_flush_pins(j, seq_to_flush, 0, 0))
*did_work = true;
spin_lock(&j->lock);
/*
......
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