From 0e94d59c14f85d826a4da36cdf5ab137becb1e1d Mon Sep 17 00:00:00 2001 From: Frederic Weisbecker Date: Sun, 25 Jan 2009 12:50:13 -0800 Subject: [PATCH] --- yaml --- r: 136518 b: refs/heads/master c: 2d4d57db692ea790e185656516e6ebe8791f1788 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/x86/include/asm/spinlock.h | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 0057cab9a07a..5ed75618514a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7106a5ab89c50c6b5aadea0850b40323804a922d +refs/heads/master: 2d4d57db692ea790e185656516e6ebe8791f1788 diff --git a/trunk/arch/x86/include/asm/spinlock.h b/trunk/arch/x86/include/asm/spinlock.h index d17c91981da2..4d3dcc51cacd 100644 --- a/trunk/arch/x86/include/asm/spinlock.h +++ b/trunk/arch/x86/include/asm/spinlock.h @@ -329,8 +329,7 @@ static inline int __raw_read_trylock(raw_rwlock_t *lock) { atomic_t *count = (atomic_t *)lock; - atomic_dec(count); - if (atomic_read(count) >= 0) + if (atomic_dec_return(count) >= 0) return 1; atomic_inc(count); return 0;