]> git.ipfire.org Git - thirdparty/systemd.git/commit
pid1: fix cleanup of stale implicit deps based on /proc/self/mountinfo 11466/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 17 Jan 2019 15:09:13 +0000 (16:09 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 26 Jan 2019 13:40:50 +0000 (14:40 +0100)
commitc52c2dc64f2443dd2e1f0cc82f577b68520ceb8f
tree2689cb20bca2e1119eea8940d9bac5f866b1956e
parentb7bbf89025d40cd73beccbb68fa1719d53aa8ab5
pid1: fix cleanup of stale implicit deps based on /proc/self/mountinfo

The problem was introduced in a37422045fbb68ad68f734e5dc00e0a5b1759773:
we have a unit which has a fragment, and when we'd update it based on
/proc/self/mountinfo, we'd say that e.g. What=/dev/loop8 has origin-fragment.
This commit changes two things:
- origin-fragment is changed to origin-mountinfo-implicit
- when we stop a unit, mountinfo information is flushed and all deps based
  on it are dropped.

The second step is important, because when we restart the unit, we want to
notice that we have "fresh" mountinfo information. We could keep the old info
around and solve this in a different way, but keeping stale information seems
inelegant.

Fixes #11342.
src/core/mount.c