switch_root.c: umount mount points we cannot move with MNT_DETACH
PATCH 1/1 switch_root.c: umount mount points we cannot move with MNT_DETACH
From: Harald Hoyer <[email protected]>
If a mount point cannot be moved to the new root, umount it with MNT_DETACH, so that it is lazy umounted and does not show up in /proc/mounts anymore.
--- sys-utils/switch_root.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
sys-utils/switch_root.c +1 -1
@@ -131,7 +131,7 @@ static int switchroot(const char *newroot)if ((stat (newmount, &sb) !=0 ) || (sb.st_dev != newroot_stat.st_dev)) {/* mount point seems to be mounted already or stat failed */ -umount (umounts[i]); +umount2 (umounts[i],MNT_DETACH );continue ; }
Signature · 1 line
1.7.7
Quoted 2 lines · On Mon, Nov 14, 2011 at 02:11:01PM +0100, [email protected] wrote:
sys-utils/switch_root.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Applied, thanks.
Signature · 2 lines
Karel Zak <[email protected]> http://karelzak.blogspot.com