--- 2.4.0-test7-pre5/include/linux/brlock.h Tue Aug 22 01:30:04 2000 +++ /tmp/brlock.h Tue Aug 22 01:56:53 2000 @@ -114,10 +114,15 @@ lock = &__br_write_locks[idx].lock; again: (*ctr)++; - rmb(); + mb(); if (spin_is_locked(lock)) { (*ctr)--; - rmb(); + wmb(); /* + * The release of the ctr must become visible + * to the other cpus eventually thus wmb(), + * we don't care if spin_is_locked is reordered + * before the releasing of the ctr. + */ while (spin_is_locked(lock)) barrier(); goto again;