]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
dbus-cgroup: Fix copy paste error
authorDaan De Meyer <daan@amutable.com>
Sat, 7 Mar 2026 22:04:38 +0000 (23:04 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Wed, 11 Mar 2026 16:53:36 +0000 (16:53 +0000)
Let's set the appropriate field for ManagedOOMMemoryPressureDurationUSec=
and not a totally different one.

src/core/dbus-cgroup.c

index 0c71017f93a5f18e93c40cd77f695bf0d99f418e..a7508c96daa116e435e58e837ed5e36b373f4bc3 100644 (file)
@@ -1721,13 +1721,13 @@ int bus_cgroup_set_property(
                                                  FORMAT_TIMESPAN(t, USEC_PER_SEC));
 
                 if (!UNIT_WRITE_FLAGS_NOOP(flags)) {
-                        c->memory_pressure_threshold_usec = t;
-                        if (c->memory_pressure_threshold_usec == USEC_INFINITY)
+                        c->moom_mem_pressure_duration_usec = t;
+                        if (c->moom_mem_pressure_duration_usec == USEC_INFINITY)
                                 unit_write_setting(u, flags, name, "ManagedOOMMemoryPressureDurationSec=");
                         else
                                 unit_write_settingf(u, flags, name,
                                                     "ManagedOOMMemoryPressureDurationSec=%s",
-                                                    FORMAT_TIMESPAN(c->memory_pressure_threshold_usec, 1));
+                                                    FORMAT_TIMESPAN(c->moom_mem_pressure_duration_usec, 1));
                 }
 
                 if (c->moom_mem_pressure == MANAGED_OOM_KILL)