From: Greg KH <greg@kroah.com>
To: Matthew Wilcox <matthew@wil.cx>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Dave Young <hidave.darkstar@gmail.com>,
kay.sievers@vrfy.org, linux-kernel@vger.kernel.org,
linux-scsi@vger.kernel.org,
James Bottomley <James.Bottomley@HansenPartnership.com>
Subject: Re: [PATCH 1/3][-mm] add class_reclassify macro
Date: Wed, 28 May 2008 09:28:39 -0700 [thread overview]
Message-ID: <20080528162839.GA12366@kroah.com> (raw)
In-Reply-To: <20080528160637.GB3851@kroah.com>
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
prev parent reply other threads:[~2008-05-28 16:33 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-20 9:55 [PATCH 1/3][-mm] add class_reclassify macro Dave Young
2008-05-20 10:02 ` Andrew Morton
2008-05-20 11:05 ` Dave Young
2008-05-20 17:30 ` Andrew Morton
2008-05-20 17:36 ` Matthew Wilcox
2008-05-20 19:23 ` Andrew Morton
2008-05-21 2:05 ` Dave Young
2008-05-20 11:36 ` Matthew Wilcox
2008-05-20 17:21 ` Greg KH
2008-05-27 6:42 ` Dave Young
2008-05-27 6:59 ` Andrew Morton
2008-05-27 7:31 ` Dave Young
2008-05-28 15:48 ` Matthew Wilcox
2008-05-28 16:06 ` Greg KH
2008-05-28 16:28 ` Greg KH [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080528162839.GA12366@kroah.com \
--to=greg@kroah.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=akpm@linux-foundation.org \
--cc=hidave.darkstar@gmail.com \
--cc=kay.sievers@vrfy.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=matthew@wil.cx \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox