]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/unit-serialize: drop deserialization compat for state_change_timestamp
authorMike Yuan <me@yhndnzj.com>
Wed, 4 Jun 2025 19:59:23 +0000 (21:59 +0200)
committerMike Yuan <me@yhndnzj.com>
Wed, 4 Jun 2025 20:03:47 +0000 (22:03 +0200)
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

index 76363e3023946861e364b9ffe543500e920a9578..c2e8496b716ef53b081b1eb3eab1a370e647778c 100644 (file)
@@ -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. */