[arch-releng] [PATCH 1/1] explicitly detach loop device on umount

Christian Hesse list at eworm.de
Tue Apr 21 05:57:29 UTC 2015


From: Christian Hesse <mail at eworm.de>

I see cases where a stale loop device stays around and fills up my
partition as image file is still in use and does not get unlinked.

Explicitly detach loop device on umount to fix that.

Signed-off-by: Christian Hesse <mail at eworm.de>
---
 archiso/mkarchiso       | 2 +-
 configs/releng/build.sh | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/archiso/mkarchiso b/archiso/mkarchiso
index 0da02b0..bc82786 100755
--- a/archiso/mkarchiso
+++ b/archiso/mkarchiso
@@ -59,7 +59,7 @@ _mount_airootfs() {
 
 _umount_airootfs() {
     _msg_info "Unmounting '${work_dir}/mnt/airootfs'"
-    umount "${work_dir}/mnt/airootfs"
+    umount -d "${work_dir}/mnt/airootfs"
     _msg_info "Done!"
     rmdir "${work_dir}/mnt/airootfs"
     trap - EXIT HUP INT TERM
diff --git a/configs/releng/build.sh b/configs/releng/build.sh
index 5590163..86cdb08 100755
--- a/configs/releng/build.sh
+++ b/configs/releng/build.sh
@@ -190,7 +190,7 @@ make_efiboot() {
     cp ${work_dir}/iso/EFI/shellx64_v2.efi ${work_dir}/efiboot/EFI/
     cp ${work_dir}/iso/EFI/shellx64_v1.efi ${work_dir}/efiboot/EFI/
 
-    umount ${work_dir}/efiboot
+    umount -d ${work_dir}/efiboot
 }
 
 # Build airootfs filesystem image
-- 
2.3.5


More information about the arch-releng mailing list