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;
{ UNIT_DEPENDENCY_DEFAULT, "default" },
{ UNIT_DEPENDENCY_UDEV, "udev" },
{ UNIT_DEPENDENCY_PATH, "path" },
- { UNIT_DEPENDENCY_MOUNTINFO_IMPLICIT, "mountinfo-implicit" },
- { UNIT_DEPENDENCY_MOUNTINFO_DEFAULT, "mountinfo-default" },
{ UNIT_DEPENDENCY_MOUNTINFO_OR_FILE, "mountinfo-or-file" },
{ UNIT_DEPENDENCY_PROC_SWAP, "proc-swap" },
{ UNIT_DEPENDENCY_SLICE_PROPERTY, "slice-property" },
/* A dependency created because of some unit's RequiresMountsFor= setting */
UNIT_DEPENDENCY_PATH = 1 << 4,
- /* A dependency created because of data read from /proc/self/mountinfo and no other configuration source */
- UNIT_DEPENDENCY_MOUNTINFO_IMPLICIT = 1 << 5,
-
- /* A dependency created because of data read from /proc/self/mountinfo, but conditionalized by
- * DefaultDependencies= and thus also involving configuration from UNIT_DEPENDENCY_FILE sources */
- UNIT_DEPENDENCY_MOUNTINFO_DEFAULT = 1 << 6,
-
/* A dependency created because of data read from /proc/self/mountinfo, but fallback to unit configuration
* sources */
- UNIT_DEPENDENCY_MOUNTINFO_OR_FILE = 1 << 7,
+ UNIT_DEPENDENCY_MOUNTINFO_OR_FILE = 1 << 5,
/* A dependency created because of data read from /proc/swaps and no other configuration source */
- UNIT_DEPENDENCY_PROC_SWAP = 1 << 8,
+ UNIT_DEPENDENCY_PROC_SWAP = 1 << 6,
/* A dependency for units in slices assigned by directly setting Slice= */
- UNIT_DEPENDENCY_SLICE_PROPERTY = 1 << 9,
+ UNIT_DEPENDENCY_SLICE_PROPERTY = 1 << 7,
- _UNIT_DEPENDENCY_MASK_FULL = (1 << 10) - 1,
+ _UNIT_DEPENDENCY_MASK_FULL = (1 << 8) - 1,
} UnitDependencyMask;
/* The Unit's dependencies[] hashmaps use this structure as value. It has the same size as a void pointer, and thus can