Re: [RFC] new module format

From: Daniel Phillips (phillips@arcor.de)
Date: Thu Jul 18 2002 - 07:13:35 EST


On Thursday 18 July 2002 14:02, Roman Zippel wrote:
> Hi,
>
> On Thu, 18 Jul 2002, Daniel Phillips wrote:
>
> > To add a new user, the active bit has to be set, as shown in this skeleton,
> > which is pretty much the existing try_inc_mod_count scheme:
> >
> > spin_lock(&some_spinlock);
> > if (<mod_active_bit>)
> > <inc_mod_user_count>
> > spin_unlock(&some_spinlock);
> >
> > if <users>, do the mount
> >
> > In other words, the module has some state, the transitions of which are
> > protected by a spinlock.
>
> This means you still need another lock to protect the data structures and
> you still have module pointers everywhere.

A module pointer per filesystem does not count as 'everywhere'.

> I want to get rid of that
> "same_spinlock" (aka unload_lock), because it's not needed.
> I suggest we continue this discussion when I post the new patches in a few
> days, then it should become more clear.

Sure.

-- 
Daniel
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Jul 23 2002 - 22:00:26 EST