diff options
Diffstat (limited to 'src/swap.c')
-rw-r--r-- | src/swap.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/swap.c b/src/swap.c index 2e3e995c3e..d093c2e790 100644 --- a/src/swap.c +++ b/src/swap.c @@ -77,10 +77,7 @@ int swap_add_one_mount_link(Swap *s, Mount *m) { if (!path_startswith(s->what, m->where)) return 0; - if ((r = unit_add_dependency(UNIT(m), UNIT_BEFORE, UNIT(s), true)) < 0) - return r; - - if ((r = unit_add_dependency(UNIT(s), UNIT_REQUIRES, UNIT(m), true)) < 0) + if ((r = unit_add_two_dependencies(UNIT(s), UNIT_AFTER, UNIT_REQUIRES, UNIT(m), true)) < 0) return r; return 0; |