summaryrefslogtreecommitdiff
path: root/src/core/mount.c
diff options
context:
space:
mode:
authorFranck Bui <fbui@suse.com>2022-09-12 17:50:51 +0200
committerFranck Bui <fbui@suse.com>2022-10-05 11:24:17 +0200
commit9c77ffc7e0459e2bbc4c0c54ff065aa302ecd62e (patch)
treeebbaef19773f1ac714c25e287697347f4b93a88c /src/core/mount.c
parentc5d82021ba126a52964753d7327c143b27a54662 (diff)
downloadsystemd-9c77ffc7e0459e2bbc4c0c54ff065aa302ecd62e.tar.gz
mount: drop UNIT_DEPENDENCY_MOUNTINFO_IMPLICIT and UNIT_DEPENDENCY_MOUNTINFO_DEFAULT
They're not used anymore.
Diffstat (limited to 'src/core/mount.c')
-rw-r--r--src/core/mount.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/core/mount.c b/src/core/mount.c
index f971519dc6..f9c5c80e35 100644
--- a/src/core/mount.c
+++ b/src/core/mount.c
@@ -611,11 +611,10 @@ static int mount_add_non_exec_dependencies(Mount *m) {
assert(m);
- /* Any dependencies based on /proc/self/mountinfo may be now stale. */
- unit_remove_dependencies(UNIT(m),
- UNIT_DEPENDENCY_MOUNTINFO_IMPLICIT |
- UNIT_DEPENDENCY_MOUNTINFO_DEFAULT |
- UNIT_DEPENDENCY_MOUNTINFO_OR_FILE);
+ /* We may be called due to this mount appearing in /proc/self/mountinfo, hence we clear all existing
+ * dependencies that were initialized from the unit file but whose final value really depends on the
+ * content of /proc/self/mountinfo. Some (such as m->where) might have become stale now. */
+ unit_remove_dependencies(UNIT(m), UNIT_DEPENDENCY_MOUNTINFO_OR_FILE);
if (!m->where)
return 0;