From 73d7bee852dadf2c238e54b99f6c3f3c544bc700 Mon Sep 17 00:00:00 2001 From: Mike Yuan Date: Wed, 4 Jun 2025 21:59:23 +0200 Subject: [PATCH] core/unit-serialize: drop deserialization compat for state_change_timestamp This was from v228, i.e. before cgroup v2 got introduced. Nowadays cgroup v1 is outright rejected during initialization, i.e. upgrading isn't possible whatsoever. Remove the compat glue there. --- src/core/unit-serialize.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/core/unit-serialize.c b/src/core/unit-serialize.c index 76363e30239..c2e8496b716 100644 --- a/src/core/unit-serialize.c +++ b/src/core/unit-serialize.c @@ -364,14 +364,6 @@ int unit_deserialize_state(Unit *u, FILE *f, FDSet *fds) { } } - /* Versions before 228 did not carry a state change timestamp. In this case, take the current - * time. This is useful, so that timeouts based on this timestamp don't trigger too early, and is - * in-line with the logic from before 228 where the base for timeouts was not persistent across - * reboots. */ - - if (!dual_timestamp_is_set(&u->state_change_timestamp)) - dual_timestamp_now(&u->state_change_timestamp); - /* Let's make sure that everything that is deserialized also gets any potential new cgroup settings * applied after we are done. For that we invalidate anything already realized, so that we can * realize it again. */ -- 2.47.3