mirror of
https://github.com/torvalds/linux.git
synced 2024-11-13 07:31:45 +00:00
bcachefs: Always write a journal entry when stopping journal
This is to fix a (harmless) bug where the read clock hand in the superblock doesn't match the journal. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
33114c2d89
commit
8be901d5d4
@ -979,9 +979,11 @@ void bch2_fs_journal_stop(struct journal *j)
|
||||
|
||||
wait_event(j->wait, journal_entry_close(j));
|
||||
|
||||
/* do we need to write another journal entry? */
|
||||
if (test_bit(JOURNAL_NOT_EMPTY, &j->flags))
|
||||
bch2_journal_meta(j);
|
||||
/*
|
||||
* Always write a new journal entry, to make sure the clock hands are up
|
||||
* to date (and match the superblock)
|
||||
*/
|
||||
bch2_journal_meta(j);
|
||||
|
||||
journal_quiesce(j);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user