From: William Lee Irwin III <wli@holomorphy.com>

wait_on_bit_lock() needs to test_and_set_bit() in the fastpath, not
test_bit().

Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/include/linux/wait.h |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -puN include/linux/wait.h~eliminate-bh-waitqueue-hashtable-fix include/linux/wait.h
--- 25/include/linux/wait.h~eliminate-bh-waitqueue-hashtable-fix	2004-08-31 01:48:09.149847032 -0700
+++ 25-akpm/include/linux/wait.h	2004-08-31 01:48:09.152846576 -0700
@@ -388,7 +388,7 @@ static inline int wait_on_bit_lock(void 
 	DEFINE_WAIT_BIT(q, word, bit);
 	wait_queue_head_t *wqh;
 
-	if (!test_bit(bit, word))
+	if (!test_and_set_bit(bit, word))
 		return 0;
 
 	wqh = bit_waitqueue(word, bit);
_