From: Lennart Poettering Date: Wed, 28 Nov 2018 11:37:23 +0000 (+0100) Subject: mount: document that mount_add_extras() must work with active units, too X-Git-Tag: v240~112^2~22 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1f736476474dcf371bfa0660aa71a7708f2ed217;p=thirdparty%2Fsystemd.git mount: document that mount_add_extras() must work with active units, too --- 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;