Commit:     54af6233d1cb84cdfaa6ea44ea0db0bcf518baac
Parent:     67e6682f18b3bf812a994ae027ff87174a297ae8
Author:     Nick Piggin <[EMAIL PROTECTED]>
AuthorDate: Mon Nov 26 14:58:10 2007 -0600
Committer:  Dave Kleikamp <[EMAIL PROTECTED]>
CommitDate: Thu Jan 3 13:11:44 2008 -0600

    JFS is missing a memory barrier
    JFS is missing a memory barrier needed to close the critical section before
    clearing the lock bit. Use lock bitops for this.
    unlock_page() has a second barrier after clearing the lock, which is
    required because it checks whether the waitqueue is active without locks.
    Such a barrier is not required here because the waitqueue spinlock is
    always taken (something to think about if performance is an issue).
    Signed-off-by: Nick Piggin <[EMAIL PROTECTED]>
    Signed-off-by: Dave Kleikamp <[EMAIL PROTECTED]>
 fs/jfs/jfs_metapage.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/jfs/jfs_metapage.c b/fs/jfs/jfs_metapage.c
index b27fa11..1dfaae5 100644
--- a/fs/jfs/jfs_metapage.c
+++ b/fs/jfs/jfs_metapage.c
@@ -39,11 +39,11 @@ static struct {
 #define metapage_locked(mp) test_bit(META_locked, &(mp)->flag)
-#define trylock_metapage(mp) test_and_set_bit(META_locked, &(mp)->flag)
+#define trylock_metapage(mp) test_and_set_bit_lock(META_locked, &(mp)->flag)
 static inline void unlock_metapage(struct metapage *mp)
-       clear_bit(META_locked, &mp->flag);
+       clear_bit_unlock(META_locked, &mp->flag);
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to