summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/namespace.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/namespace.c b/src/core/namespace.c
index b573f008b9..ef85bfec23 100644
--- a/src/core/namespace.c
+++ b/src/core/namespace.c
@@ -237,6 +237,8 @@ static int mount_dev(BindMount *m) {
*/
(void) mkdir_p_label(m->path, 0755);
+ /* Unmount everything in old /dev */
+ umount_recursive(m->path, 0);
if (mount(dev, m->path, NULL, MS_MOVE, NULL) < 0) {
r = -errno;
goto fail;