Commit 68a6cd9b authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] ppc64: fix inline version of _raw_spin_trylock

From: Paul Mackerras <paulus@samba.org>

When I added the out-of-line spinlocks on PPC64, I inadvertently introduced
a bug in the inline version of _raw_spin_trylock, where it returns the
opposite of what it should return.  The patch below fixes it.
parent fb5c2d93
......@@ -65,7 +65,7 @@ static __inline__ int _raw_spin_trylock(spinlock_t *lock)
: "r"(&lock->lock)
: "cr0", "memory");
return tmp != 0;
return tmp == 0;
}
static __inline__ void _raw_spin_lock(spinlock_t *lock)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment