From 24a3d53b28398d2edd4dc717bede21eaf4a3b874 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Mon, 28 Feb 2022 19:29:19 -0500 Subject: bcachefs: __journal_entry_close() never fails Previous patch just moved responsibility for incrementing the journal sequence number and initializing the new journal entry from __journal_entry_close() to journal_entry_open(); this patch makes the analagous change for journal reservation state, incrementing the index into array of journal_bufs at open time. This means that __journal_entry_close() never fails to close an open journal entry, which is important for the next patch that will change our emergency shutdown behaviour. Signed-off-by: Kent Overstreet --- fs/bcachefs/journal.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'fs/bcachefs/journal.h') diff --git a/fs/bcachefs/journal.h b/fs/bcachefs/journal.h index 409d32b784d2..948e8b53dffd 100644 --- a/fs/bcachefs/journal.h +++ b/fs/bcachefs/journal.h @@ -264,9 +264,6 @@ static inline void bch2_journal_buf_put(struct journal *j, unsigned idx) .buf3_count = idx == 3, }).v, &j->reservations.counter); - EBUG_ON(((s.idx - idx) & 3) > - ((s.idx - s.unwritten_idx) & 3)); - if (!journal_state_count(s, idx) && idx == s.unwritten_idx) __bch2_journal_buf_put(j); } -- cgit v1.2.3