[PATCH] sparc32 rwlock fix
authorAl Viro <viro@ftp.linux.org.uk>
Sun, 8 Oct 2006 13:32:15 +0000 (14:32 +0100)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sun, 8 Oct 2006 19:32:35 +0000 (12:32 -0700)
read_trylock() is broken on sparc32 (doesn't build and didn't work
right, actually).  Proposed fix:

 - make "writer holds lock" distinguishable from "reader tries to grab
   lock"

 - have __raw_read_trylock() try to acquire the mutex (in LSB of lock),
   terminating spin if we see that there's writer holding it.  Then do
   the rest as we do in read_lock().

Thanks to Ingo for discussion...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

No differences found