cgroup-util: drop 'controller' argument from cg_get_keyed_attribute() and cg_is_empty()
The argument is completely unused. Let's drop it.
This commit is contained in:
+2
-6
@@ -2714,7 +2714,7 @@ int unit_cgroup_is_empty(Unit *u) {
|
||||
if (!crt->cgroup_path)
|
||||
return -EOWNERDEAD;
|
||||
|
||||
r = cg_is_empty(SYSTEMD_CGROUP_CONTROLLER, crt->cgroup_path);
|
||||
r = cg_is_empty(crt->cgroup_path);
|
||||
if (r < 0)
|
||||
log_unit_debug_errno(u, r, "Failed to determine whether cgroup %s is empty: %m", empty_to_root(crt->cgroup_path));
|
||||
return r;
|
||||
@@ -3033,7 +3033,6 @@ int unit_check_oom(Unit *u) {
|
||||
|
||||
if (ctx->memory_oom_group) {
|
||||
r = cg_get_keyed_attribute(
|
||||
"memory",
|
||||
crt->cgroup_path,
|
||||
"memory.events.local",
|
||||
STRV_MAKE("oom_group_kill"),
|
||||
@@ -3044,7 +3043,6 @@ int unit_check_oom(Unit *u) {
|
||||
|
||||
if (isempty(oom_kill)) {
|
||||
r = cg_get_keyed_attribute(
|
||||
"memory",
|
||||
crt->cgroup_path,
|
||||
"memory.events",
|
||||
STRV_MAKE("oom_kill"),
|
||||
@@ -3156,7 +3154,6 @@ static int unit_check_cgroup_events(Unit *u) {
|
||||
return 0;
|
||||
|
||||
r = cg_get_keyed_attribute(
|
||||
SYSTEMD_CGROUP_CONTROLLER,
|
||||
crt->cgroup_path,
|
||||
"cgroup.events",
|
||||
STRV_MAKE("populated", "frozen"),
|
||||
@@ -3601,7 +3598,7 @@ static int unit_get_cpu_usage_raw(const Unit *u, const CGroupRuntime *crt, nsec_
|
||||
_cleanup_free_ char *val = NULL;
|
||||
uint64_t us;
|
||||
|
||||
r = cg_get_keyed_attribute("cpu", crt->cgroup_path, "cpu.stat", STRV_MAKE("usage_usec"), &val);
|
||||
r = cg_get_keyed_attribute(crt->cgroup_path, "cpu.stat", STRV_MAKE("usage_usec"), &val);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
@@ -4037,7 +4034,6 @@ static int unit_cgroup_freezer_kernel_state(Unit *u, FreezerState *ret) {
|
||||
return -EOWNERDEAD;
|
||||
|
||||
r = cg_get_keyed_attribute(
|
||||
SYSTEMD_CGROUP_CONTROLLER,
|
||||
crt->cgroup_path,
|
||||
"cgroup.events",
|
||||
STRV_MAKE("frozen"),
|
||||
|
||||
+1
-1
@@ -2015,7 +2015,7 @@ static int cgroup_good(Service *s) {
|
||||
if (!s->cgroup_runtime || !s->cgroup_runtime->cgroup_path)
|
||||
return 0;
|
||||
|
||||
r = cg_is_empty(SYSTEMD_CGROUP_CONTROLLER, s->cgroup_runtime->cgroup_path);
|
||||
r = cg_is_empty(s->cgroup_runtime->cgroup_path);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user