bcachefs: bch2_journal_key_insert() no longer transfers ownership
authorKent Overstreet <kent.overstreet@gmail.com>
Fri, 24 Dec 2021 02:35:28 +0000 (21:35 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:19 +0000 (17:09 -0400)
commite75b2d4c1c829142f8e3e64a9b3cf7faedcfb640
tree75f6894c21e6efb33e63fa06fcb5e2185f93842f
parent4b674b09a950fb20aa30e902331e4eba12059b80
bcachefs: bch2_journal_key_insert() no longer transfers ownership

bch2_journal_key_insert() used to assume that the key passed to it was
allocated with kmalloc(), and on success took ownership. This patch
deletes that behaviour, making it more similar to
bch2_trans_update()/bch2_trans_commit().

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
fs/bcachefs/btree_gc.c
fs/bcachefs/buckets.c
fs/bcachefs/recovery.c
fs/bcachefs/recovery.h