From: Mike Yuan Date: Wed, 4 Jun 2025 19:59:23 +0000 (+0200) Subject: core/unit-serialize: drop deserialization compat for state_change_timestamp X-Git-Tag: v258-rc1~386^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=73d7bee852dadf2c238e54b99f6c3f3c544bc700;p=thirdparty%2Fsystemd.git 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. --- 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. */