bcachefs: Fix error path in bch2_trans_commit_write_locked()
authorKent Overstreet <kent.overstreet@linux.dev>
Tue, 13 Dec 2022 23:19:30 +0000 (18:19 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:48 +0000 (17:09 -0400)
commit1ae40fd816ca6f52b46a8d74f799f8a85ecb92ad
tree4a1b8cb543c117d24c522861ce44a663e5cfa7b5
parent08f7803159f63e0ce5660acca061cbd6bac06166
bcachefs: Fix error path in bch2_trans_commit_write_locked()

Previously, we were journalling extra_journal_entries (which is used for
new btree roots, and irreversably mutates system state) before calling
bch2_trans_fs_usage_apply(), which can fail - whoops.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/btree_update_leaf.c