summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorUmut Tezduyar <umut@tezduyar.com>2013-03-11 16:30:10 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-03-15 22:55:24 -0400
commit89b1d5e0e49d3b3501e5f3aadcad712290bcd9bf (patch)
tree9224361747f3fc19cfbe85f9e391be0d1bfbd31f /src/core
parentdf34f169b8961c6ef1429cdb940206b42c3f9041 (diff)
core: keep mountinfo .mounts until late shutdown
.mount units coming from /proc/self/mountinfo file are unmounted after local-fs.target is reached during shutdown. Problem: .mount units popping up in mountinfo file are added to systemd without any dependency. For that reason, they are the first one to be unmounted during shutdown. Whichever program mounted the file system deserves a chance to also unmount it. This patch ensures that /proc/self/mountinfo units will be unmounted after local-fs.target during shutdown (if they haven't been unmounted already)
Diffstat (limited to 'src/core')
-rw-r--r--src/core/mount.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/mount.c b/src/core/mount.c
index 73a7832430..7a1b411c7b 100644
--- a/src/core/mount.c
+++ b/src/core/mount.c
@@ -1501,6 +1501,14 @@ static int mount_add_one(
goto fail;
}
+ r = unit_add_dependency_by_name(u, UNIT_BEFORE, SPECIAL_LOCAL_FS_TARGET, NULL, true);
+ if (r < 0)
+ goto fail;
+
+ r = unit_add_dependency_by_name(u, UNIT_CONFLICTS, SPECIAL_UMOUNT_TARGET, NULL, true);
+ if (r < 0)
+ goto fail;
+
unit_add_to_load_queue(u);
} else {
delete = false;