diff options
author | Abdó Roig-Maranges <abdo.roig@gmail.com> | 2017-07-31 12:32:09 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2017-07-31 12:32:09 +0200 |
commit | 1df96fcb31b3bc30c4a983de4734f61ed5a29115 (patch) | |
tree | c211c035c24dd1356a9706bd0a840a161ac2a5d9 /src/core/mount.c | |
parent | Merge pull request #6472 from yuwata/journal-gateway-fix (diff) | |
download | systemd-1df96fcb31b3bc30c4a983de4734f61ed5a29115.tar.xz systemd-1df96fcb31b3bc30c4a983de4734f61ed5a29115.zip |
core: Do not fail perpetual mount units without fragment (#6459)
mount_load does not require fragment files to be present in order to
load mount units which are perpetual, or come from /proc/self/mountinfo.
mount_verify should do the same, otherwise a synthesized '-.mount' would
be marked as failed with "No such file or directory", as it is perpetual
but not marked to come from /proc/self/mountinfo at this point.
This happens for the user instance, and I suspect it was the cause of #5375
for the system instance, without gpt-generator.
Diffstat (limited to 'src/core/mount.c')
-rw-r--r-- | src/core/mount.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/mount.c b/src/core/mount.c index 0e66ffb3b6..25f27909dd 100644 --- a/src/core/mount.c +++ b/src/core/mount.c @@ -503,7 +503,7 @@ static int mount_verify(Mount *m) { if (UNIT(m)->load_state != UNIT_LOADED) return 0; - if (!m->from_fragment && !m->from_proc_self_mountinfo) + if (!m->from_fragment && !m->from_proc_self_mountinfo && !UNIT(m)->perpetual) return -ENOENT; r = unit_name_from_path(m->where, ".mount", &e); |