core: pass Unit into cgroup_context_apply() and use log_unit*()
authorTejun Heo <htejun@fb.com>
Thu, 2 Jun 2016 17:02:49 +0000 (13:02 -0400)
committerTejun Heo <tj@kernel.org>
Thu, 2 Jun 2016 17:02:49 +0000 (13:02 -0400)
commitf29ff1159cf40c59d3611e02356985c791830795
tree46c0ade5c0d6b7f79a5b6abe2e2441b93ec92200
parent201c1cc22a41df1f4ef7706bde41e2536bef433f
core: pass Unit into cgroup_context_apply() and use log_unit*()

cgroup_context_apply() and friends take CGroupContext and cgroup path as input
and has no way of getting back to the associated Unit and thus uses raw cgroup
path for logging.  This makes the log messages difficult to track down.
There's no reason to avoid passing in Unit into these functions.  Pass in Unit
and use log_unit*() instead.

While at it, make cgroup_context_apply(), which has no outside users, static.
Also, drop cgroup path from log messages where the path itself isn't too
interesting and can be easily obtained from the unit.
src/core/cgroup.c
src/core/cgroup.h