chiark / gitweb /
swap: backing device should unconditionally want swap unit
authorTom Gundersen <teg@jklm.no>
Wed, 21 Aug 2013 14:47:26 +0000 (22:47 +0800)
committerTom Gundersen <teg@jklm.no>
Wed, 11 Sep 2013 12:40:59 +0000 (14:40 +0200)
There is no need to restrict this to only the 'nofail' case. In the '!nofail'
case the unit is already wanted by swap.target, so this is not a functional change.

src/core/swap.c

index 825503f3dea2909d010111930fb1daf1e8ffd425..f0e19ad8c42159c04a2ac5c0e4ae6cdf3a37a420 100644 (file)
@@ -187,8 +187,7 @@ static int swap_add_device_links(Swap *s) {
                 return 0;
 
         if (is_device_path(s->what))
-                return unit_add_node_link(UNIT(s), s->what,
-                                          !p->noauto && p->nofail &&
+                return unit_add_node_link(UNIT(s), s->what, !p->noauto &&
                                           UNIT(s)->manager->running_as == SYSTEMD_SYSTEM);
         else
                 /* File based swap devices need to be ordered after