From: Kent Overstreet Date: Thu, 22 Aug 2024 02:27:45 +0000 (-0400) Subject: bcachefs: Fix warning in bch2_fs_journal_stop() X-Git-Tag: microblaze-v6.13~9^2~154 X-Git-Url: http://git.monstr.eu/?a=commitdiff_plain;h=7f2de6947f92cfa4be8e5eaa1237e962bb8ee65f;p=linux-2.6-microblaze.git 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 --- diff --git a/fs/bcachefs/journal.c b/fs/bcachefs/journal.c index 649e3a01608a..f5f7db50ca31 100644 --- a/fs/bcachefs/journal.c +++ b/fs/bcachefs/journal.c @@ -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);