diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-02-26 04:14:35 +0100 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 23:09:25 +0200 |
commit | cb598111836fbca03b1353a6238cde8a66e5ddf0 (patch) | |
tree | 4767a2c7c93eb85e1a4a67a6ad189e45047af7a7 /fs/bcachefs/journal_reclaim.c | |
parent | bcachefs: Heap allocate printbufs (diff) | |
download | linux-cb598111836fbca03b1353a6238cde8a66e5ddf0.tar.xz linux-cb598111836fbca03b1353a6238cde8a66e5ddf0.zip |
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: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/journal_reclaim.c')
-rw-r--r-- | fs/bcachefs/journal_reclaim.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/bcachefs/journal_reclaim.c b/fs/bcachefs/journal_reclaim.c index 2d5382a83003..3cc980b07285 100644 --- a/fs/bcachefs/journal_reclaim.c +++ b/fs/bcachefs/journal_reclaim.c @@ -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); /* |