From: Christoph Hellwig <hch@infradead.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: Linus Torvalds <torvalds@osdl.org>,
lkml <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@osdl.org>,
Arjan van de Ven <arjanv@infradead.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>,
Christoph Hellwig <hch@infradead.org>, Andi Kleen <ak@suse.de>,
Russell King <rmk+lkml@arm.linux.org.uk>,
Nicolas Pitre <nico@cam.org>,
linux-xfs@oss.sgi.com
Subject: Re: [patch 1/8] mutex subsystem, XFS namespace collision fixes
Date: Wed, 21 Dec 2005 16:36:39 +0000 [thread overview]
Message-ID: <20051221163639.GA9735@infradead.org> (raw)
In-Reply-To: <20051221155426.GB7243@elte.hu>
On Wed, Dec 21, 2005 at 04:54:26PM +0100, Ingo Molnar wrote:
> Fixup the XFS code to avoid name clashing with the mutex code by
> introducing xfs_mutex_ functions.
>
> Signed-off-by: Jes Sorensen <jes@trained-monkey.org>
> Signed-off-by: Ingo Molnar <mingo@elte.hu>
>
> ----
>
> fs/xfs/linux-2.6/mutex.h | 10 +++++-----
> fs/xfs/quota/xfs_dquot.c | 12 ++++++------
> fs/xfs/quota/xfs_dquot.h | 4 ++--
> fs/xfs/quota/xfs_qm.c | 20 ++++++++++----------
> fs/xfs/quota/xfs_qm.h | 4 ++--
> fs/xfs/quota/xfs_qm_bhv.c | 2 +-
> fs/xfs/quota/xfs_qm_syscalls.c | 24 ++++++++++++------------
> fs/xfs/quota/xfs_quota_priv.h | 8 ++++----
> fs/xfs/support/uuid.c | 12 ++++++------
> fs/xfs/xfs_mount.c | 4 ++--
> fs/xfs/xfs_mount.h | 4 ++--
> 11 files changed, 52 insertions(+), 52 deletions(-)
>
> Index: linux/fs/xfs/linux-2.6/mutex.h
> ===================================================================
> --- linux.orig/fs/xfs/linux-2.6/mutex.h
> +++ linux/fs/xfs/linux-2.6/mutex.h
> @@ -30,10 +30,10 @@
> #define MUTEX_DEFAULT 0x0
> typedef struct semaphore mutex_t;
>
> -#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) arch_sema_init(lock, 1)
> +#define xfs_mutex_destroy(lock) arch_sema_init(lock, -99)
> +#define xfs_mutex_lock(lock, num) arch_down(lock)
> +#define xfs_mutex_trylock(lock) (arch_down_trylock(lock) ? 0 : 1)
> +#define xfs_mutex_unlock(lock) arch_up(lock)
As the name implies these use mutex xsemantics, just remove the
defines and use mutex_lock/mutex_unlock and mutex_trylock directly
(the latter only if mutex_trylock has the same return value as
spin_trylock, not the broken down_trylock version)
not sure what to do about mutex_init, do you have one in your patches?
mutex_destroy should be a simple no-op.
next prev parent reply other threads:[~2005-12-21 16:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-21 15:54 Ingo Molnar
2005-12-21 16:36 ` Christoph Hellwig [this message]
2005-12-21 22:36 Ingo Molnar
2005-12-22 1:53 ` Johannes Stezenbach
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=20051221163639.GA9735@infradead.org \
--to=hch@infradead.org \
--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=jes@trained-monkey.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@oss.sgi.com \
--cc=mingo@elte.hu \
--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®