From: Kent Overstreet Date: Wed, 10 Feb 2021 18:39:48 +0000 (-0500) Subject: bcachefs: Assert that we're not trying to flush journal seq in the future X-Git-Tag: v6.7-rc1~201^2~1798 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5ea037d03cabc219f5b2ccd72b7a33fa036c9bfc;p=thirdparty%2Fkernel%2Flinux.git bcachefs: Assert that we're not trying to flush journal seq in the future Signed-off-by: Kent Overstreet Signed-off-by: Kent Overstreet --- diff --git a/fs/bcachefs/journal.c b/fs/bcachefs/journal.c index b33d985fa020d..c2b1eef6265a1 100644 --- a/fs/bcachefs/journal.c +++ b/fs/bcachefs/journal.c @@ -574,6 +574,8 @@ int bch2_journal_flush_seq_async(struct journal *j, u64 seq, spin_lock(&j->lock); + BUG_ON(seq > journal_cur_seq(j)); + /* Recheck under lock: */ if (j->err_seq && seq >= j->err_seq) { ret = -EIO;