diff options
author | Chen, Kenneth W <kenneth.w.chen@intel.com> | 2006-04-07 17:12:54 -0700 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2006-04-07 22:39:49 -0700 |
commit | cfab9d0e1da8e08a39759d0fc3bf5e40f0ac2d55 (patch) | |
tree | e7dd4bbb97374b758bcb169b635b997c12893565 | |
parent | 0681226661754a99de711cda2c2bd12ff9cd2c3b (diff) | |
download | kernel_samsung_aries-cfab9d0e1da8e08a39759d0fc3bf5e40f0ac2d55.zip kernel_samsung_aries-cfab9d0e1da8e08a39759d0fc3bf5e40f0ac2d55.tar.gz kernel_samsung_aries-cfab9d0e1da8e08a39759d0fc3bf5e40f0ac2d55.tar.bz2 |
[IA64] fix bug in ia64 __mutex_fastpath_trylock
The parenthesis around "likely" used in ia64 __mutex_fastpath_trylock
is incorrect, and it leads to broken mutex_trylock. Here is the
patch that fixed the bug. I removed the likely altogether because
there is no branch and gcc does a reasonable job at predicating the
return value.
Signed-off-by: Ken Chen <kenneth.w.chen@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
-rw-r--r-- | include/asm-ia64/mutex.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/asm-ia64/mutex.h b/include/asm-ia64/mutex.h index 5a3224f..bed73a6 100644 --- a/include/asm-ia64/mutex.h +++ b/include/asm-ia64/mutex.h @@ -84,7 +84,7 @@ __mutex_fastpath_unlock(atomic_t *count, void (*fail_fn)(atomic_t *)) static inline int __mutex_fastpath_trylock(atomic_t *count, int (*fail_fn)(atomic_t *)) { - if (likely(cmpxchg_acq(count, 1, 0)) == 1) + if (cmpxchg_acq(count, 1, 0) == 1) return 1; return 0; } |