projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bb1dc0b
)
ratelimit: fix the return value when __ratelimit() fails to acquire the lock
author
Yong Zhang
<
[email protected]
>
Tue, 6 Apr 2010 21:35:03 +0000
(14:35 -0700)
committer
Linus Torvalds
<
[email protected]
>
Wed, 7 Apr 2010 15:38:04 +0000
(08:38 -0700)
The log of commit
edaac8e3167501cda336231d00611bf59c164346
("ratelimit:
Fix/allow use in atomic contexts"), indicates that we want to suppress the
callback when the trylock fails.
Signed-off-by: Yong Zhang <
[email protected]
>
Cc: Ingo Molnar <
[email protected]
>
Cc: Christian Borntraeger <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
lib/ratelimit.c
patch
|
blob
|
history
diff --git
a/lib/ratelimit.c
b/lib/ratelimit.c
index b4cd24ff9b29713d27171189b913422c243355e3..027a03f4c56d4059b23560c984f5699e44e069d8 100644
(file)
--- 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;