bcachefs: Fix warning in bch2_fs_journal_stop()

j->last_empty_seq needs to match j->seq when the journal is empty

Reported-by: syzbot+4093905737cf289b6b38@syzkaller.appspotmail.com
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2024-08-21 22:27:45 -04:00
parent 06f67437ab
commit 7f2de6947f

View File

@ -1260,7 +1260,7 @@ int bch2_fs_journal_start(struct journal *j, u64 cur_seq)
}
if (!had_entries)
j->last_empty_seq = cur_seq;
j->last_empty_seq = cur_seq - 1; /* to match j->seq */
spin_lock(&j->lock);