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: Kent Overstreet <kent.overstreet@gmail.com>
This commit is contained in:
parent
86b7445193
commit
17047fbced
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user