From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Sat, 20 Jan 2007 08:05:46 +0100 From: Nick Piggin Subject: [patch] buffer: memorder fix Message-ID: <20070120070546.GC30774@wotan.suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Sender: owner-linux-mm@kvack.org Return-Path: To: Andrew Morton , Linus Torvalds , Linux Kernel Mailing List , Linux Memory Management List List-ID: 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 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: email@kvack.org