summaryrefslogtreecommitdiff
path: root/fs/bcachefs/journal_reclaim.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2022-02-26 06:14:35 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:09:25 +0300
commitcb598111836fbca03b1353a6238cde8a66e5ddf0 (patch)
tree4767a2c7c93eb85e1a4a67a6ad189e45047af7a7 /fs/bcachefs/journal_reclaim.c
parentfa8e94faeece12c20b541f647059f29867e98bc0 (diff)
downloadlinux-cb598111836fbca03b1353a6238cde8a66e5ddf0.tar.xz
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.c3
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);
/*