summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/util.c
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruenba@redhat.com>2025-01-26 11:28:59 +0100
committerKent Overstreet <kent.overstreet@linux.dev>2025-03-14 21:02:13 -0400
commitec70103f9b8a2d28644fcf0c027421cfa15553b1 (patch)
treea12de146090925e909cbfa2a7deef00fa3badbbc /fs/bcachefs/util.c
parentbcachefs: eytzinger self tests: fix cmp_u16 typo (diff)
downloadlinux-ec70103f9b8a2d28644fcf0c027421cfa15553b1.tar.gz
linux-ec70103f9b8a2d28644fcf0c027421cfa15553b1.zip
bcachefs: eytzinger[01]_test improvement
In eytzinger[01]_test(), make sure that eytzinger[01]_for_each() iterates over all array elements. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/util.c')
-rw-r--r--fs/bcachefs/util.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/bcachefs/util.c b/fs/bcachefs/util.c
index 3a69e3409e89..2af77c410179 100644
--- a/fs/bcachefs/util.c
+++ b/fs/bcachefs/util.c
@@ -734,6 +734,7 @@ void eytzinger1_test(void)
inorder++;
}
+ BUG_ON(inorder - 1 != size);
}
}
@@ -767,6 +768,7 @@ void eytzinger0_test(void)
inorder++;
}
+ BUG_ON(inorder != size);
}
}