From: Lennart Poettering Date: Fri, 22 Sep 2017 18:02:23 +0000 (+0200) Subject: cgroup: make use of unit_cgroup_delegate() where useful X-Git-Tag: v235~66^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7960b0c704f2b41705219ba36f0cd6f9a29cef99;p=thirdparty%2Fsystemd.git cgroup: make use of unit_cgroup_delegate() where useful It's an easy-to-use wrapper, so let's take benefit of it. --- diff --git a/src/core/unit.c b/src/core/unit.c index df89f3d01f1..f1936bdf0b0 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -4429,14 +4429,10 @@ int unit_acquire_invocation_id(Unit *u) { return 0; } -void unit_set_exec_params(Unit *s, ExecParameters *p) { - CGroupContext *c; - - assert(s); - assert(s); - - p->cgroup_path = s->cgroup_path; +void unit_set_exec_params(Unit *u, ExecParameters *p) { + assert(u); + assert(p); - c = unit_get_cgroup_context(s); - SET_FLAG(p->flags, EXEC_CGROUP_DELEGATE, c && c->delegate); + p->cgroup_path = u->cgroup_path; + SET_FLAG(p->flags, EXEC_CGROUP_DELEGATE, unit_cgroup_delegate(u)); }