* [patch] buffer: memorder fix
@ 2007-01-20 7:05 Nick Piggin
0 siblings, 0 replies; only message in thread
From: Nick Piggin @ 2007-01-20 7:05 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds, Linux Kernel Mailing List,
Linux Memory Management List
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)?
Signed-off-by: Nick Piggin <npiggin@suse.de>
Index: linux-2.6/fs/buffer.c
===================================================================
--- linux-2.6.orig/fs/buffer.c
+++ 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 majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-01-20 7:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-20 7:05 [patch] buffer: memorder fix Nick Piggin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox