From 0d520d044373cf3ece81c2aa8f979e7e71130ba1 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Sat, 7 Jun 2025 19:33:46 -0400 Subject: bcachefs: kill darray_u32_has() Signed-off-by: Kent Overstreet --- fs/bcachefs/fsck.c | 10 +--------- 1 file changed, 1 insertion(+), 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: "); -- cgit v1.2.3