The module ref count for rd.o module is not adjusted and remains 1 while doing
the following things.
[root@llm01 mod]# insmod /sdb/linux-2.5.70/drivers/block/rd.o
[root@llm01 mod]# lsmod
Module Size Used by
rd 5568 0 - Live 0xf88b5000
[root@llm01 mod]# mkfs -t ext2 /dev/ram0
.
.
[root@llm01 mod]# lsmod
Module Size Used by
rd 5568 1 - Live 0xf88b5000
mount/umount of /dev/ram0 does not change the rd.o module ref count.
So, who is supposed to release the rd.o module gracefully?
Also mount /dev/ram0 should hold a ref and umount should release the same.
Same test on 2.4.20 looks correct and mount increments the ref count and
umount decrements the ref count.
Regards,
Maneesh
--
Maneesh Soni
IBM Linux Technology Center,
IBM India Software Lab, Bangalore.
Phone: +91-80-5044999 email: [email protected]
http://lse.sourceforge.net/
On Thu, May 29, 2003 at 03:55:10PM +0530, Maneesh Soni wrote:
> The module ref count for rd.o module is not adjusted and remains 1 while
> doing the following things.
>
> [root@llm01 mod]# insmod /sdb/linux-2.5.70/drivers/block/rd.o
> [root@llm01 mod]# lsmod
> Module Size Used by
> rd 5568 0 - Live 0xf88b5000
> [root@llm01 mod]# mkfs -t ext2 /dev/ram0
> .
> .
> [root@llm01 mod]# lsmod
> Module Size Used by
> rd 5568 1 - Live 0xf88b5000
>
> mount/umount of /dev/ram0 does not change the rd.o module ref count.
>
> So, who is supposed to release the rd.o module gracefully?
> Also mount /dev/ram0 should hold a ref and umount should release the same.
>
> Same test on 2.4.20 looks correct and mount increments the ref count and
> umount decrements the ref count.
I think you'll find you have to tell the ramdisk to invalidate its contents
before the module count drops.
--
Russell King ([email protected]) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html