summaryrefslogtreecommitdiff
path: root/src/core/mount.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/mount.c')
-rw-r--r--src/core/mount.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/core/mount.c b/src/core/mount.c
index 3357b7df5b..5f50d9557a 100644
--- a/src/core/mount.c
+++ b/src/core/mount.c
@@ -263,6 +263,21 @@ static int mount_add_socket_links(Mount *m) {
return 0;
}
+static int mount_add_requires_mounts_links(Mount *m) {
+ Unit *other;
+ int r;
+
+ assert(m);
+
+ LIST_FOREACH(has_requires_mounts_for, other, UNIT(m)->manager->has_requires_mounts_for) {
+ r = unit_add_one_mount_link(other, m);
+ if (r < 0)
+ return r;
+ }
+
+ return 0;
+}
+
static char* mount_test_option(const char *haystack, const char *needle) {
struct mntent me;
@@ -614,6 +629,10 @@ static int mount_load(Unit *u) {
if ((r = mount_add_path_links(m)) < 0)
return r;
+ r = mount_add_requires_mounts_links(m);
+ if (r < 0)
+ return r;
+
if ((r = mount_add_automount_links(m)) < 0)
return r;