]> git.ipfire.org Git - thirdparty/systemd.git/commit
core/cgroup: drop extraneous CGRuntime check in unit_get_memory_available()
authorMike Yuan <me@yhndnzj.com>
Mon, 24 Mar 2025 18:46:46 +0000 (19:46 +0100)
committerMike Yuan <me@yhndnzj.com>
Fri, 4 Apr 2025 13:34:52 +0000 (15:34 +0200)
commitfc4663b379d14a821932cf684bad1cc2a31fee3c
treecdbcc4da3ce1d6785edf853256d1566bf0699193
parent702aa33935efb354c5b197b54dcdf583b507d1be
core/cgroup: drop extraneous CGRuntime check in unit_get_memory_available()

Currently, for units whose CGRuntime is not allocated just yet, e.g.
inactive ones, MemoryAvailable fails to account for their MemoryMax/High
settings. Let's remove the CGRuntime check hence. The call to
unit_get_memory_accounting() would certainly fail, but it doesn't matter,
since 'current' is initially set to 0 anyways.
src/core/cgroup.c