bcachefs: Don't get journal reservation until after we know insert will succeed
authorKent Overstreet <kent.overstreet@gmail.com>
Tue, 26 Feb 2019 22:13:46 +0000 (17:13 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:16 +0000 (17:08 -0400)
commitc8cc5b3e3fa154446eae9aa461aeb97bc5a07c09
tree885853c2e229b6b5272da7365a119028bf33e09d
parent8db2acde2fca80954b4db12977182aa44b1e85fe
bcachefs: Don't get journal reservation until after we know insert will succeed

Checking if we can do the insert after getting the journal reservation
means potentially wasting space in the journal, which will break the new
pre reservation mechanism

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