lkml.org 
[lkml]   [2008]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3][-mm] add class_reclassify macro
On Wed, May 28, 2008 at 09:06:37AM -0700, Greg KH wrote:
> On Wed, May 28, 2008 at 09:48:40AM -0600, Matthew Wilcox wrote:
> > On Mon, May 26, 2008 at 11:59:34PM -0700, Andrew Morton wrote:
> > > If that semaphore is being used as a mutex then we should convert it to
> > > a mutex (dammit).
> >
> > Right.
> >
> > > Leaving it implemented as a semphore is not the proper way of
> > > suppressing the lockdep warnings. It would be better to convert it to
> > > a mutex then add suitable (and suitably commented) open-coded lockdep
> > > annotations to suppress the runtime warnings.
> >
> > We don't even have to go that far. Here's all that's needed:
> >
> > diff -u a/drivers/base/class.c b/drivers/base/class.c
> > --- a/drivers/base/class.c
> > +++ b/drivers/base/class.c
> > @@ -134,7 +134,7 @@
> > }
> > }
> >
> > -int class_register(struct class *cls)
> > +int __class_register(struct class *cls, struct lock_class_key *key)
>
> Sorry, this will not work properly, as class_create() is now more
> commonly called, and it calls class_register() from within the driver
> core. So there would be a lot of classes with the same "key" because of
> this.
>
> So try changing class_create also.

Oh forget it, I'm messing around in this area anyway, so all of these
changes are not going to apply to tomorrow's -next tree at all.

I'll take this and get it working, give me a bit...

thanks,

greg k-h


\
 
 \ /
  Last update: 2008-05-28 18:37    [W:0.040 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site