]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
mount: when allocating a Mount object based on /proc/self/mountinfo mark it so
authorLennart Poettering <lennart@poettering.net>
Wed, 28 Nov 2018 13:51:04 +0000 (14:51 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 7 Dec 2018 16:35:32 +0000 (17:35 +0100)
Let's set 'from_proc_self_mountinfo' right away, since we know its from
there. This is important so that when the load queue is dispatched (and
thus mount_load() called) this
fact is already known.

src/core/mount.c

index 6a0bc1075e624c8988e349c5763da7bacefad7ad..599e3b24fe6f4d9849c1b9c511d10041f2f27ecb 100644 (file)
@@ -1487,6 +1487,13 @@ static int mount_setup_new_unit(
         if (r < 0)
                 return r;
 
+        /* This unit was generated because /proc/self/mountinfo reported it. Remember this, so that by the time we load
+         * the unit file for it (and thus add in extra deps right after) we know what source to attributes the deps
+         * to.*/
+        MOUNT(u)->from_proc_self_mountinfo = true;
+
+        /* We have only allocated the stub now, let's enqueue this unit for loading now, so that everything else is
+         * loaded in now. */
         unit_add_to_load_queue(u);
 
         flags->is_mounted = true;