]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: let's be defensive, /dev/nfs is also a special mount source, filter it out
authorLennart Poettering <lennart@poettering.net>
Tue, 21 Jan 2020 17:09:09 +0000 (18:09 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 21 Jan 2020 19:23:34 +0000 (20:23 +0100)
src/core/mount.c

index cf19af10b14f5dc2dcc75f119325fe195ef5f4fc..0964eb18642dae881459ac0f9fe83dba0dd27194 100644 (file)
@@ -342,10 +342,9 @@ static int mount_add_device_dependencies(Mount *m) {
         if (!is_device_path(p->what))
                 return 0;
 
-        /* /dev/root is a really weird thing, it's not a real device,
-         * but just a path the kernel exports for the root file system
-         * specified on the kernel command line. Ignore it here. */
-        if (path_equal(p->what, "/dev/root"))
+        /* /dev/root is a really weird thing, it's not a real device, but just a path the kernel exports for
+         * the root file system specified on the kernel command line. Ignore it here. */
+        if (PATH_IN_SET(p->what, "/dev/root", "/dev/nfs"))
                 return 0;
 
         if (path_equal(m->where, "/"))