mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-15 15:15:47 +00:00
bcachefs: Fix a null ptr deref during journal replay
We were calling bch2_extent_can_insert() incorrectly; it should only be called when the extents-to-keys pass is running because that's when we could be splitting a compressed extent. Calling bch2_extent_can_insert() without passing in a disk reservation was causing a null ptr deref. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
47c46c9531
commit
75923ba7ad
1 changed files with 1 additions and 1 deletions
|
@ -309,7 +309,7 @@ btree_key_can_insert(struct btree_trans *trans,
|
|||
if (unlikely(btree_node_old_extent_overwrite(b)))
|
||||
return BTREE_INSERT_BTREE_NODE_FULL;
|
||||
|
||||
ret = !btree_node_is_extents(b)
|
||||
ret = !(iter->flags & BTREE_ITER_IS_EXTENTS)
|
||||
? BTREE_INSERT_OK
|
||||
: bch2_extent_can_insert(trans, iter, insert);
|
||||
if (ret)
|
||||
|
|
Loading…
Reference in a new issue