mount: let mount_add_extras() take care of remote-fs.target deps

In a previous commit we added logic that mount_add_extras() (or more
precisely mount_add_default_dependencies()) adds in dependencies on
remote-fs.target and local-fs.target, hence we can drop this from
mount_setup_new_unit() and let the usual load queue dispatching take
care of this.
This commit is contained in:
Lennart Poettering 2018-11-28 14:42:21 +01:00
parent e10fe04266
commit 26e35b164b

View file

@ -1487,23 +1487,8 @@ static int mount_setup_new_unit(
if (r < 0)
return r;
if (!mount_is_extrinsic(MOUNT(u))) {
MountParameters *p;
const char *target;
p = &MOUNT(u)->parameters_proc_self_mountinfo;
target = mount_is_network(p) ? SPECIAL_REMOTE_FS_TARGET : SPECIAL_LOCAL_FS_TARGET;
r = unit_add_dependency_by_name(u, UNIT_BEFORE, target, true, UNIT_DEPENDENCY_MOUNTINFO_IMPLICIT);
if (r < 0)
return r;
r = unit_add_dependency_by_name(u, UNIT_CONFLICTS, SPECIAL_UMOUNT_TARGET, true, UNIT_DEPENDENCY_MOUNTINFO_IMPLICIT);
if (r < 0)
return r;
}
unit_add_to_load_queue(u);
flags->is_mounted = true;
flags->just_mounted = true;
flags->just_changed = true;