[MIPS] Fix bug in atomic_sub_if_positive.
authorRalf Baechle <ralf@linux-mips.org>
Thu, 3 Jul 2008 22:28:35 +0000 (23:28 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Fri, 4 Jul 2008 07:22:15 +0000 (08:22 +0100)
The branch optimization fixes in 2.6.21 introduced a bug in
atomic_sub_if_positive that causes it to return even when the sc
instruction fails. The result is that e.g. down_trylock becomes unreliable
as the semaphore counter is not always decremented.

Original MUA-shredded patch from Morten Larsen <mlarsen@broadcom.com>.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

No differences found