aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2026-02-20 09:59:31 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2026-02-20 09:59:31 +0000
commit9e63925306dd86243c13becd93ab6d211c9b5010 (patch)
tree8f6953f592e07eba4036016798c677f723acec8f
parent2505243cd4becc70b6745fb2da742ca8a456a3be (diff)
downloads6-9e63925306dd86243c13becd93ab6d211c9b5010.tar.gz
s6-svscan: remove broken optimization for inactive removal
-rw-r--r--src/supervision/s6-svscan.c14
1 files changed, 3 insertions, 11 deletions
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 ;
}