core: unify reset_accounting handling
authorMike Yuan <me@yhndnzj.com>
Sat, 1 Jun 2024 23:50:09 +0000 (07:50 +0800)
committerMike Yuan <me@yhndnzj.com>
Fri, 28 Jun 2024 13:43:08 +0000 (15:43 +0200)
commitbc347edfe075f36bada0e1e7aefd62b10fcad4a7
tree2eefd9fa2e6ee552aead057a27faf2d212b804eb
parent5a8c2c95598f17fb79cca07365e70e54a7abcc88
core: unify reset_accounting handling

Since the introduction of CGroupRuntime, there's no need
to call *_reset_accounting in unit_new(), hence make those
static. While at it, refrain from hardcoding default values
in cgroup_runtime_new(), but call the corresponding funcs.

This also corrects the default value of io_accounting_base.

Fixes #33482
src/core/cgroup.c
src/core/cgroup.h
src/core/unit.c