On Mon, 31 Jul 2000, Andi Kleen wrote:
> I'm not sure I follow, but shouldn't mounting increase the fs module count? 
> How else would you do module count management for file systems  ?

I think I understand what Alexander is saying - it is ok to not increment
the module count on kern_mount because if you try to remove the module the
cleanup_module() will be invoked where you _should_ always unregister
filesystem and kern_umount it and this (register+kern_mount,
unregister+kern_umount) pair can only occur once throughout the lifetime
of a module.

Therefore, the problem is not that the module's refcount doesn't go up but
that it goes down. In other words, module refcount management on
mount/umount doesn't apply to kern_mount/kern_umount - only to user
mount(2)/umount(2).

Therefore, the solution is not to increment it on kern_mount but to
_not_ decrement it on kern_umount as it happens today due to kill_super().

Regards,
Tigran



Reply via email to