From 1f736476474dcf371bfa0660aa71a7708f2ed217 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 28 Nov 2018 12:37:23 +0100 Subject: [PATCH] mount: document that mount_add_extras() must work with active units, too --- src/core/mount.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/mount.c b/src/core/mount.c index 94498bfc31c..cfce01417e1 100644 --- a/src/core/mount.c +++ b/src/core/mount.c @@ -543,6 +543,10 @@ static int mount_add_extras(Mount *m) { assert(m); + /* Note: this call might be called after we already have been loaded once (and even when it has already been + * activated), in case data from /proc/self/mountinfo has changed. This means all code here needs to be ready + * to run with an already set up unit. */ + if (u->fragment_path) m->from_fragment = true; -- 2.47.3