2.2.16: can't remove loop modules

From: Kevin Range (range006@tc.umn.edu)
Date: Mon Jun 26 2000 - 12:03:03 EST


After using a loop device like:

mount -t iso9660 -o ro,loop=/dev/loop0 file /mnt

and then unmounting it later (umount /dev/loop0)

I can't mount /dev/loop0 again, I have to use loop1. Then loop2 and so on...

If I try to manually remove the loop module (rmmod loop) I get:

rmmod: loop: Device or resource busy

Which it shouldn't be 'cause its not mounted.

Anyone know what is wrong? Is this a bug or am I missing something. It
seems to me that I will have to reboot when i run out of loop devices,
since I can't seem to free them up.

I am running RedHat 2.2.16-3 kernel on a dual pII-450 with 512MB of RAM.
I compiled the kernel myself from the patched RedHat sources, so if you want
to know all what patches they put in just ask and I will tell you.

ver_linux says:
Kernel modules 2.1.121
Gnu C egcs-2.91.66
Binutils 2.9.1.0.24
Linux C Library 2.1.2
Dynamic linker ldd (GNU libc) 2.1.2
Procps 2.0.4
Mount 2.9o
Net-tools 1.52
Console-tools 1999.03.02
Sh-utils 2.0
Modules Loaded loop
                        ^
see, loop is loaded-----|

[root@pinot-noir /root]# cat /proc/modules
loop 10336 4 (autoclean)

[root@pinot-noir /proc]# cat /proc/mounts
/dev/root / ext2 rw 0 0
/proc /proc proc rw 0 0
/dev/sda3 /scratch ext2 rw 0 0
/dev/sda4 /usr ext2 rw 0 0
none /dev/pts devpts rw 0 0

but not mounted!
[root@pinot-noir /proc]# cat /proc/devices
Character devices:
<clip>

Block devices:
  1 ramdisk
  2 fd
  7 loop
  8 sd
  9 md
 11 sr
 22 ide1
 65 sd

Thanks.

-- 
--------------------------------
Kevin Range
range006@tc.umn.edu

281 Kolthoff: 612-625-6317 --------------------------------

- 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/



This archive was generated by hypermail 2b29 : Mon Jun 26 2000 - 21:00:10 EST