diff options
author | Daniel Mack <daniel@zonque.org> | 2017-09-05 19:27:53 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2017-09-22 15:24:55 +0200 |
commit | 906c06f64a87cce5378191c092d10432543ea907 (patch) | |
tree | 48e13e6705e3e7841017c44d5ab48244430c2f31 /src/core/swap.c | |
parent | Add firewall eBPF compiler (diff) | |
download | systemd-906c06f64a87cce5378191c092d10432543ea907.tar.gz systemd-906c06f64a87cce5378191c092d10432543ea907.tar.bz2 systemd-906c06f64a87cce5378191c092d10432543ea907.zip |
cgroup, unit, fragment parser: make use of new firewall functions
Diffstat (limited to 'src/core/swap.c')
-rw-r--r-- | src/core/swap.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/swap.c b/src/core/swap.c index 303f62d25..d58f68458 100644 --- a/src/core/swap.c +++ b/src/core/swap.c @@ -620,9 +620,10 @@ static int swap_spawn(Swap *s, ExecCommand *c, pid_t *_pid) { assert(_pid); (void) unit_realize_cgroup(UNIT(s)); - if (s->reset_cpu_usage) { - (void) unit_reset_cpu_usage(UNIT(s)); - s->reset_cpu_usage = false; + if (s->reset_accounting) { + (void) unit_reset_cpu_accounting(UNIT(s)); + (void) unit_reset_ip_accounting(UNIT(s)); + s->reset_accounting = false; } r = unit_setup_exec_runtime(UNIT(s)); @@ -861,7 +862,7 @@ static int swap_start(Unit *u) { return r; s->result = SWAP_SUCCESS; - s->reset_cpu_usage = true; + s->reset_accounting = true; swap_enter_activating(s); return 1; |