summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2025-06-07 19:33:46 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2025-07-01 00:03:40 -0400
commitbe9405eb0390f460d7a2b3cb62c82e98091eca60 (patch)
tree60b9abbb34d863891856116df60ffae6fdb35a54
parent4ae3c834352bd8644163e0b49c4eb4349e732319 (diff)
bcachefs: kill darray_u32_has()
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r--fs/bcachefs/fsck.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/fs/bcachefs/fsck.c b/fs/bcachefs/fsck.c
index dbf161e4311a..62756f465e56 100644
--- a/fs/bcachefs/fsck.c
+++ b/fs/bcachefs/fsck.c
@@ -2590,14 +2590,6 @@ int bch2_check_root(struct bch_fs *c)
return ret;
}
-static bool darray_u32_has(darray_u32 *d, u32 v)
-{
- darray_for_each(*d, i)
- if (*i == v)
- return true;
- return false;
-}
-
static int check_subvol_path(struct btree_trans *trans, struct btree_iter *iter, struct bkey_s_c k)
{
struct bch_fs *c = trans->c;
@@ -2630,7 +2622,7 @@ static int check_subvol_path(struct btree_trans *trans, struct btree_iter *iter,
u32 parent = le32_to_cpu(s.v->fs_path_parent);
- if (darray_u32_has(&subvol_path, parent)) {
+ if (darray_find(subvol_path, parent)) {
printbuf_reset(&buf);
prt_printf(&buf, "subvolume loop: ");