diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-03-01 03:29:19 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:09:26 +0300 |
commit | 24a3d53b28398d2edd4dc717bede21eaf4a3b874 (patch) | |
tree | 9ba1e8bf729fb88bd3c4027f370422c8eb5b6f97 /fs/bcachefs/journal.h | |
parent | 30ef633a0b46e06860f46bf7df0f5a313e6e1a19 (diff) | |
download | linux-24a3d53b28398d2edd4dc717bede21eaf4a3b874.tar.xz |
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 <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/journal.h')
-rw-r--r-- | fs/bcachefs/journal.h | 3 |
1 files changed, 0 insertions, 3 deletions
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); } |