From 221d58ec842f70419060c898b9b3025b7109ea3b Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 28 Mar 2008 18:08:13 +0000 Subject: - ensure umount on loopback-mounted-file doesn't leak /dev/loop (otherwise it breaks install from isos on disk) (#36992) --- perl-install/fs/mount.pm | 7 +++++++ perl-install/install/NEWS | 2 ++ 2 files changed, 9 insertions(+) (limited to 'perl-install') diff --git a/perl-install/fs/mount.pm b/perl-install/fs/mount.pm index e96228d75..7ca29dbda 100644 --- a/perl-install/fs/mount.pm +++ b/perl-install/fs/mount.pm @@ -179,6 +179,13 @@ sub part { run_program::run('quotacheck', $mntpoint); } } + if (isLoopback($part) && $::isInstall) { + #- since /etc/mtab is symlinked to /proc/mounts, umount will + #- not be able to know it needs to do losetup -d + #- TODO: drop this and have a real /etc/mtab + $part->{real_device} = cat_("/proc/mounts") =~ m!(/dev/\S+)\s+\Q$mntpoint\E\s! && $1; + log::l("XXX $part->{real_device}"); + } } } $part->{isMounted} = 1; diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS index 886dfd2dc..406bb7d13 100644 --- a/perl-install/install/NEWS +++ b/perl-install/install/NEWS @@ -1,3 +1,5 @@ +- ensure umount on loopback-mounted-file doesn't leak /dev/loop + (otherwise it breaks install from isos on disk) (#36992) - warn the user and propose to install/quit-install before upgrading from a partition where "/" is ext3 with block-size 1KB to avoid kernel bug (#37583) -- cgit v1.2.1