dbus-cgroup: Fix copy paste error

Let's set the appropriate field for ManagedOOMMemoryPressureDurationUSec=
and not a totally different one.
This commit is contained in:
Daan De Meyer
2026-03-11 16:53:36 +00:00
committed by Luca Boccassi
parent 7c4047957e
commit 2f5cecd7de
+3 -3
View 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)