Re: loopback devices are not freeed on umount

Andi Kleen (ak@muc.de)
08 Mar 1999 16:03:33 +0100


j.w.r.degoede@et.tudelft.nl (Hans de Goede) writes:

> Hi all,
>
> If I mount a floppy image or an iso image trough loopback for example:
>
> mount boot.img t -o loop=/dev/loop0
>
> and then umount it with:
> umount t
> or:
> umount /dev/loop0
>
> The loopback module usage count stays 1 in /proc/modules
> also I cannot mount another image thorugh /dev/loop0 cause it's still in
> use acording to
> the kernel.

mount does an implicit losetup, but umount does not do an implicit
losetup (because that could be inconvenient e.g. with encrypted filesystems).
So you have to remove the loop device afterwards with losetup -d.

-Andi

-- 
This is like TV. I don't like TV.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/