Skip to contentSkip to conversation

buffer: memorder fix

PATCH New Nick Piggin 1 participant 1 message Jan 20, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 buffer: memorder fix

Anyone mind telling me why unlock_buffer, unlike unlock_page, thinks it can clear the lock without ensuring the critical section is closed (ie. with a barrier)?

fs/buffer.c +1 -0
Index: linux-2.6/fs/buffer.c
===================================================================
@@ -78,6 +78,7 @@ EXPORT_SYMBOL(__lock_buffer);
 
 void fastcall unlock_buffer(struct buffer_head *bh)
 {
+	smp_mb__before_clear_bit();
 	clear_buffer_locked(bh);
 	smp_mb__after_clear_bit();
 	wake_up_bit(&bh->b_state, BH_Lock);

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>