mount_root: umount /tmp/overlay in external root case as well
authorJo-Philipp Wich <jow@openwrt.org>
Fri, 26 Jul 2013 09:03:26 +0000 (11:03 +0200)
committerJo-Philipp Wich <jow@openwrt.org>
Fri, 26 Jul 2013 09:03:26 +0000 (11:03 +0200)
mount_root.c

index eec60d67afde10499db78f2850cd828f14e37eba..f1474f0a2beee89ea9722a009baf3ba4dbe7df7d 100644 (file)
@@ -718,6 +718,8 @@ static int extroot(const char *prefix)
                                        ERROR("switching to pivotroot failed - continue normal boot\n");
                                        umount("/mnt");
                                } else {
+                                       umount("/tmp/overlay");
+                                       rmdir("/tmp/overlay");
                                        rmdir("/tmp/extroot/mnt");
                                        rmdir("/tmp/extroot");
                                        return 0;