aboutsummaryrefslogtreecommitdiff
path: root/fs/bcachefs/journal.h
diff options
context:
space:
mode:
authorGravatar Kent Overstreet <kent.overstreet@gmail.com> 2022-02-28 19:29:19 -0500
committerGravatar Kent Overstreet <kent.overstreet@linux.dev> 2023-10-22 17:09:26 -0400
commit24a3d53b28398d2edd4dc717bede21eaf4a3b874 (patch)
tree9ba1e8bf729fb88bd3c4027f370422c8eb5b6f97 /fs/bcachefs/journal.h
parentbcachefs: Refactor journal code to not use unwritten_idx (diff)
downloadlinux-24a3d53b28398d2edd4dc717bede21eaf4a3b874.tar.gz
linux-24a3d53b28398d2edd4dc717bede21eaf4a3b874.tar.bz2
linux-24a3d53b28398d2edd4dc717bede21eaf4a3b874.zip
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.h3
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);
}