]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Always create dependencies for bind mounts
authorMichal Koutný <mkoutny@suse.com>
Tue, 19 Apr 2016 16:44:40 +0000 (18:44 +0200)
committerMichal Koutný <mkoutny@suse.com>
Mon, 25 Apr 2016 11:12:02 +0000 (13:12 +0200)
Dependencies were not created for _netdev mountpoints, the reasoning for this
is in the commit fc676b00, i.e. to avoid adding dependencies for network
mountpoints where What= appears like a path. Thus proposing this semantically
more correct condition when dependencies are added for _actual_ bind mounts
irrespectively of network flag.

Consequently it allows to add _netdev option to bind mounts, which includes
them in remote-fs.target, which simplifies configuration.

src/core/mount.c

index 632c5c824cbbbcf358e081bc551c496faf10d769..efb4a39eb491917a8630f62b8654cf39b743535e 100644 (file)
@@ -274,7 +274,7 @@ static int mount_add_mount_links(Mount *m) {
         pm = get_mount_parameters_fragment(m);
         if (pm && pm->what &&
             path_is_absolute(pm->what) &&
-            !mount_is_network(pm)) {
+            (mount_is_bind(pm) || !mount_is_network(pm))) {
 
                 r = unit_require_mounts_for(UNIT(m), pm->what);
                 if (r < 0)