From 9e63925306dd86243c13becd93ab6d211c9b5010 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Fri, 20 Feb 2026 09:59:31 +0000 Subject: s6-svscan: remove broken optimization for inactive removal --- src/supervision/s6-svscan.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/supervision/s6-svscan.c b/src/supervision/s6-svscan.c index f943965..cb30829 100644 --- a/src/supervision/s6-svscan.c +++ b/src/supervision/s6-svscan.c @@ -466,12 +466,8 @@ static void set_scan_timeout (unsigned int n) static int remove_deadinactive_iter (void *data, void *aux) { service *sv = data ; - uint32_t *n = aux ; - if (!bitarray_peek(active, sv - SERVICE(0))) - { - if (!sv->pid) remove_service(sv) ; - if (!--n) return 0 ; - } + if (!bitarray_peek(active, sv - SERVICE(0)) && !sv->pid) remove_service(sv) ; + (void)aux ; return 1 ; } @@ -548,11 +544,7 @@ static void scan (unsigned int *what) return ; } memcpy(active, tmpactive, bitarray_div8(max)) ; - - { - uint32_t n = genset_n(services) - avltreen_len(by_devino) ; - if (n) genset_iter(services, &remove_deadinactive_iter, &n) ; - } + genset_iter(services, &remove_deadinactive_iter, 0) ; *what &= ~16 ; } -- cgit v1.3.1