diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-02-28 16:35:42 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:26 -0400 |
commit | f0a3a2ccabc5ae1e2c7d588a6a4f77d216b1d4cf (patch) | |
tree | e73497e869282d970457a8cae86d792f7bde39d6 /fs/bcachefs/super-io.c | |
parent | b66fbf33425f30aacbbb95182c22d2df5b1d3b12 (diff) | |
download | linux-f0a3a2ccabc5ae1e2c7d588a6a4f77d216b1d4cf.tar.gz linux-f0a3a2ccabc5ae1e2c7d588a6a4f77d216b1d4cf.tar.bz2 linux-f0a3a2ccabc5ae1e2c7d588a6a4f77d216b1d4cf.zip |
bcachefs: Journal seq now incremented at entry open, not close
This patch changes journal_entry_open() to initialize the new journal
entry, not __journal_entry_close().
This also means that journal_cur_seq() refers to the sequence number of
the last journal entry when we don't have an open journal entry, not the
next one.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/super-io.c')
-rw-r--r-- | fs/bcachefs/super-io.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/super-io.c b/fs/bcachefs/super-io.c index 31b175a8fcd0..03a8ae496668 100644 --- a/fs/bcachefs/super-io.c +++ b/fs/bcachefs/super-io.c @@ -1344,7 +1344,7 @@ void bch2_fs_mark_clean(struct bch_fs *c) } sb_clean->flags = 0; - sb_clean->journal_seq = cpu_to_le64(journal_cur_seq(&c->journal) - 1); + sb_clean->journal_seq = cpu_to_le64(atomic64_read(&c->journal.seq)); /* Trying to catch outstanding bug: */ BUG_ON(le64_to_cpu(sb_clean->journal_seq) > S64_MAX); |