From: Yong Zhang <yong.zhang@windriver.com>
To: linux-kernel@vger.kernel.org
Cc: mingo@elte.hu
Subject: [RFC PATCH 3/3] ratelimit: Fix return value when fail to get lock
Date: Wed, 17 Mar 2010 10:58:44 +0800 [thread overview]
Message-ID: <1268794724-8665-4-git-send-email-yong.zhang@windriver.com> (raw)
In-Reply-To: <1268794724-8665-1-git-send-email-yong.zhang@windriver.com>
>From log of commit edaac8e3167501cda336231d00611bf59c164346,
It seems that we want to suppress the callback when trylock
fails.
Signed-off-by: Yong Zhang <yong.zhang@windriver.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
---
lib/ratelimit.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/ratelimit.c b/lib/ratelimit.c
index 29a10b3..358638f 100644
--- a/lib/ratelimit.c
+++ b/lib/ratelimit.c
@@ -40,7 +40,7 @@ int ___ratelimit(struct ratelimit_state *rs, const char *func)
* the entity that is holding the lock already:
*/
if (!spin_trylock_irqsave(&rs->lock, flags))
- return 1;
+ return 0;
if (!rs->begin)
rs->begin = jiffies;
--
1.6.3.3
next prev parent reply other threads:[~2010-03-17 2:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-17 2:58 [PATCH 0/3] ratelimit: patchset focus on return value of __ratelimit() Yong Zhang
2010-03-17 2:58 ` [PATCH 1/3] ratelimit: annotate ___ratelimit() Yong Zhang
2010-03-17 2:58 ` [PATCH 2/3] kernel.h: fix wrong usage of __ratelimit() Yong Zhang
2010-03-17 2:58 ` Yong Zhang [this message]
2010-03-22 20:07 ` [RFC PATCH 3/3] ratelimit: Fix return value when fail to get lock Andrew Morton
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=1268794724-8665-4-git-send-email-yong.zhang@windriver.com \
--to=yong.zhang@windriver.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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®