]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/shared/switch-root.c
Revert "shutdown: do not umount recursively before MS_MOVE"
[thirdparty/systemd.git] / src / shared / switch-root.c
index 3801fec6459876f4d02a5bb1fa6b586ca90680de..b620156c75be0558ad3062b44f810e8e0edee8aa 100644 (file)
@@ -185,8 +185,7 @@ int switch_root(const char *new_root,
                  * MS_MOVE won't magically unmount anything below it. Once the chroot() succeeds the mounts
                  * below would still be around but invisible to us, because not accessible via
                  * /proc/self/mountinfo. Hence, let's clean everything up first, as long as we still can. */
-                if (!FLAGS_SET(flags, SWITCH_ROOT_SKIP_RECURSIVE_UMOUNT))
-                        (void) umount_recursive_full(NULL, MNT_DETACH, STRV_MAKE(new_root));
+                (void) umount_recursive_full(NULL, MNT_DETACH, STRV_MAKE(new_root));
 
                 if (mount(".", "/", NULL, MS_MOVE, NULL) < 0)
                         return log_error_errno(errno, "Failed to move %s to /: %m", new_root);