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
This commit is contained in:
Mike Yuan
2024-06-28 15:43:08 +02:00
parent 5a8c2c9559
commit bc347edfe0
3 changed files with 74 additions and 105 deletions
-3
View File
@@ -129,9 +129,6 @@ Unit* unit_new(Manager *m, size_t size) {
.burst = 16
};
unit_reset_memory_accounting_last(u);
unit_reset_io_accounting_last(u);
return u;
}