From: Andrew Morton <akpm@osdl.org>
To: Hirokazu Takata <takata.hirokazu@renesas.com>
Cc: Matthew Wilcox <matthew@wil.cx>,
Hirokazu Takata <takata@linux-m32r.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] m32r: Revise __raw_read_trylock()
Date: Tue, 26 Sep 2006 14:33:44 -0700 [thread overview]
Message-ID: <20060926143344.f036aa76.akpm@osdl.org> (raw)
In-Reply-To: <swf8xk8l75h.wl%takata.hirokazu@renesas.com>
On Mon, 25 Sep 2006 16:47:22 +0900
Hirokazu Takata <takata.hirokazu@renesas.com> wrote:
> Andrew, please drop and replace the previous my patch with the following
> Matthew's fix.
>
> Thank you.
>
> Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
> Cc: Matthew Wilcox <matthew@wil.cx>
> --
> include/asm-m32r/spinlock.h | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/include/asm-m32r/spinlock.h b/include/asm-m32r/spinlock.h
> index f94c1a6..f9f9072 100644
> --- a/include/asm-m32r/spinlock.h
> +++ b/include/asm-m32r/spinlock.h
> @@ -298,7 +298,14 @@ #endif /* CONFIG_CHIP_M32700_TS1 */
> );
> }
>
> -#define __raw_read_trylock(lock) generic__raw_read_trylock(lock)
> +static inline int __raw_read_trylock(raw_rwlock_t *lock)
> +{
> + atomic_t *count = (atomic_t*)lock;
> + if (atomic_dec_return(count) >= 0)
> + return 1;
> + atomic_inc(count);
> + return 0;
> +}
We don't have a changelog for this patch. My usual technique when this
happens is to mutter something unprintable then go on a hunt through the
mailing list archives.
But all I have is "Matthew Wilcox pointed out that
generic__raw_read_trylock() is unfit for use.".
What's wrong with it?
next prev parent reply other threads:[~2006-09-26 21:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-22 6:29 [PATCH] m32r: Revise __raw_read_trylock() Hirokazu Takata
2006-09-22 7:48 ` Paul Mundt
2006-09-22 11:27 ` Matthew Wilcox
2006-09-25 6:09 ` Paul Mundt
2006-09-24 6:20 ` Matthew Wilcox
2006-09-25 7:47 ` Hirokazu Takata
2006-09-26 21:33 ` Andrew Morton [this message]
2006-09-26 22:29 ` Matthew Wilcox
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=20060926143344.f036aa76.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew@wil.cx \
--cc=takata.hirokazu@renesas.com \
--cc=takata@linux-m32r.org \
/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