bcachefs: Kill bch2_path_put_nokeep()
authorKent Overstreet <kent.overstreet@linux.dev>
Thu, 22 May 2025 19:40:24 +0000 (15:40 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Fri, 23 May 2025 11:59:43 +0000 (07:59 -0400)
commit659489f37bd0471d5a77abdfe86eb105ad11297e
treeb1650a70e1a5590c80b1f51b6a3df69728c34fe5
parent2a6c0136ae9ac44f2b097e469d4cee95cd11e4f8
bcachefs: Kill bch2_path_put_nokeep()

bch2_path_put_nokeep() was intended for paths we wouldn't need to
preserve for a transaction restart - it always frees them right away
when the ref hits 0.

But since paths are shared, freeing unconditionally is a bug, the path
might have been used elsewhere and have should_be_locked set, i.e. we
need to keep it locked until the end of the transaction.

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