Commit 17047fbc authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Fix incorrectly freeing btree_path in alloc path

Clearing path->preserve means the path will be dropping in
bch2_trans_begin() - but on transaction restart, we're likely to need
that path again.

This fixes a livelock in the allocation path.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
parent 86b74451
......@@ -335,7 +335,8 @@ void bch2_trans_copy_iter(struct btree_iter *, struct btree_iter *);
static inline void set_btree_iter_dontneed(struct btree_iter *iter)
{
iter->path->preserve = false;
if (!iter->trans->restarted)
iter->path->preserve = false;
}
void *bch2_trans_kmalloc(struct btree_trans *, size_t);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment