From: Ingo Molnar <mingo@elte.hu>
To: Christoph Hellwig <hch@infradead.org>,
lkml <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@osdl.org>, Andrew Morton <akpm@osdl.org>,
Arjan van de Ven <arjanv@infradead.org>,
Nicolas Pitre <nico@cam.org>,
Jes Sorensen <jes@trained-monkey.org>,
Zwane Mwaikambo <zwane@arm.linux.org.uk>,
Oleg Nesterov <oleg@tv-sign.ru>,
David Howells <dhowells@redhat.com>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
Benjamin LaHaise <bcrl@kvack.org>,
Steven Rostedt <rostedt@goodmis.org>, Andi Kleen <ak@suse.de>,
Russell King <rmk+lkml@arm.linux.org.uk>
Subject: Re: [patch 9/9] mutex subsystem, XFS namespace collision fixes
Date: Thu, 22 Dec 2005 14:00:38 +0100 [thread overview]
Message-ID: <20051222130038.GA21998@elte.hu> (raw)
In-Reply-To: <20051222120052.GC30964@infradead.org>
* Christoph Hellwig <hch@infradead.org> wrote:
> > -#define mutex_init(lock, type, name) sema_init(lock, 1)
> > -#define mutex_destroy(lock) sema_init(lock, -99)
> > -#define mutex_lock(lock, num) down(lock)
> > -#define mutex_trylock(lock) (down_trylock(lock) ? 0 : 1)
> > -#define mutex_unlock(lock) up(lock)
> > +#define xfs_mutex_init(lock, type, name) sema_init(lock, 1)
> > +#define xfs_mutex_destroy(lock) sema_init(lock, -99)
> > +#define xfs_mutex_lock(lock, num) down(lock)
> > +#define xfs_mutex_trylock(lock) (down_trylock(lock) ? 0 : 1)
> > +#define xfs_mutex_unlock(lock) up(lock)
>
> Again, this should really be using the mutex primitives (obviously
> ;-)).
yeah - but i didnt want to impact something so large as XFS. Such a
change has to be tested and validated - so i wanted to get the namespace
collision out of the way first. But i'd be happy to add an XFS
conversion patch ontop of these, provided someone tests it.
> While we're at it, maybe we should a mutex_destroy aswell? it would
> be non-mandatory and allow that a lock is gone for the debugging
> variant.
right now the lock is gone from the debugging state once it's unlocked.
I'll add mutex_destroy(), it should be rather easy (it can e.g. destroy
mutex->magic).
Ingo
prev parent reply other threads:[~2005-12-22 13:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-22 11:43 Ingo Molnar
2005-12-22 12:00 ` Christoph Hellwig
2005-12-22 13:00 ` Ingo Molnar [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=20051222130038.GA21998@elte.hu \
--to=mingo@elte.hu \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=arjanv@infradead.org \
--cc=bcrl@kvack.org \
--cc=dhowells@redhat.com \
--cc=hch@infradead.org \
--cc=jes@trained-monkey.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nico@cam.org \
--cc=oleg@tv-sign.ru \
--cc=rmk+lkml@arm.linux.org.uk \
--cc=rostedt@goodmis.org \
--cc=torvalds@osdl.org \
--cc=zwane@arm.linux.org.uk \
/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
all inboxes | Powered by JetHome®