bcachefs: __journal_entry_close() never fails
authorKent Overstreet <kent.overstreet@gmail.com>
Tue, 1 Mar 2022 00:29:19 +0000 (19:29 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:26 +0000 (17:09 -0400)
commit24a3d53b28398d2edd4dc717bede21eaf4a3b874
tree9ba1e8bf729fb88bd3c4027f370422c8eb5b6f97
parent30ef633a0b46e06860f46bf7df0f5a313e6e1a19
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>
fs/bcachefs/journal.c
fs/bcachefs/journal.h
fs/bcachefs/journal_io.c
fs/bcachefs/journal_types.h