bcachefs: Fix a debug assertion

This assertion was passing the wrong btree node type when inserting into
interior nodes.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2020-04-04 15:49:42 -04:00 committed by Kent Overstreet
parent 8707ab0df2
commit 2aec5955bb

View File

@ -250,7 +250,8 @@ static inline void btree_insert_entry_checks(struct btree_trans *trans,
BUG_ON(bkey_cmp(insert->k.p, iter->pos));
BUG_ON(debug_check_bkeys(c) &&
bch2_bkey_invalid(c, bkey_i_to_s_c(insert), iter->btree_id));
bch2_bkey_invalid(c, bkey_i_to_s_c(insert),
__btree_node_type(iter->level, iter->btree_id)));
}
static noinline int