bcachefs: Fix faulty assertion

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
This commit is contained in:
Kent Overstreet 2021-10-30 05:28:27 -04:00 committed by Kent Overstreet
parent 2debb1b875
commit d740729272

View File

@ -661,7 +661,8 @@ static void bch2_btree_path_verify(struct btree_trans *trans,
for (i = 0; i < (!path->cached ? BTREE_MAX_DEPTH : 1); i++) {
if (!path->l[i].b) {
BUG_ON(c->btree_roots[path->btree_id].b->c.level > i);
BUG_ON(!path->cached &&
c->btree_roots[path->btree_id].b->c.level > i);
break;
}