kmem_cache_destroy: Can't free all objects

Urban Purkat urban.purkat at hermes.si
Thu Oct 7 14:52:39 UTC 2004


Hello!

I am writing a FS filter that will be above the ext3 filesystem.
For my own purposes I need severl bytes in inode. There are not enough space
current inode so I need to create my own inode functions alloc_inode() &
destroy_inode().

The problem causes when destroying slab cache at removing my module (rmmod).
kmem_cache_destroy: Can't free all objects

What I do:
 - install my module (insmod)
 - Mount filesystem
 - list the mountpoint with ls -i
 - cat /proc/slabinfo shows:
my_ii_cache           1      7    512    1    1    1
 - I make umnount
 - cat /proc/slabinfo shows:
my_ii_cache           4     14    512    1    2    1

    Where did 4 came from?
    I believe it should be 0.
  - Then I remove module (rmmod):
   when callong function kmem_cache_destroy() I receive an error:
kmem_cache_destroy: Can't free all objects de1b42b0

Can anyone help me?
Is is possible that this is a kernel bug?

BTW: I use RHEL3UP3 (kernel 2.4.21-20.EL)

Can you CC my e-mail address? I am not on the list.

Regards,

Urban Purkat




More information about the Ext3-users mailing list