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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user