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)
This commit is contained in:
parent
df34f169b8
commit
89b1d5e0e4
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue