On Mon, 31 Jul 2000, Andi Kleen wrote:

> On Sun, Jul 30, 2000 at 06:04:16PM -0400, Alexander Viro wrote:
> > 
> > 
> > On Sun, 30 Jul 2000, Andi Kleen wrote:
> > 
> > > 
> > > kern_mount currently forgets to increase the module count of the file system,
> > > leading to negative module count after umount.
> > 
> > That's because it is not supposed to be used more than once or to be
> > undone by umount(). If it _would_ increment the counter you would be
> > unable to get rid of the module once it's loaded. What are you actually
> > trying to do?
> 
> It is not even done once. I was just writing a small module that registers
> a private file system similar to sockfs.

Great, so why locking it in-core? It should be done when you mount it, not
when you register.

> IMHO kern_mount should increase the count so that it is symmetric with
> kern_umount

<blinks> How TF did kern_umount() come to decrement it? Oh, I see -
side effect of kill_super()... OK, _that_ must be fixed. By adding
get_filesystem(sb->s_type); before the call of kill_super(sb, 0); in
kern_umount().

Reply via email to