patch-1.3.45 linux/include/linux/locks.h

Next file: linux/include/linux/timex.h
Previous file: linux/include/linux/fs.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.44/linux/include/linux/locks.h linux/include/linux/locks.h
@@ -9,20 +9,19 @@
 
 extern inline void wait_on_buffer(struct buffer_head * bh)
 {
-	if (bh->b_lock)
+	if (test_bit(BH_Lock, &bh->b_state))
 		__wait_on_buffer(bh);
 }
 
 extern inline void lock_buffer(struct buffer_head * bh)
 {
-	if (bh->b_lock)
+	if (set_bit(BH_Lock, &bh->b_state))
 		__wait_on_buffer(bh);
-	bh->b_lock = 1;
 }
 
 extern inline void unlock_buffer(struct buffer_head * bh)
 {
-	bh->b_lock = 0;
+	clear_bit(BH_Lock, &bh->b_state);
 	wake_up(&bh->b_wait);
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this