Message ID | 20110727214804.6E36E2403FF@tassilo.jf.intel.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Index: linux-2.6.35.y/include/linux/seqlock.h =================================================================== --- linux-2.6.35.y.orig/include/linux/seqlock.h +++ linux-2.6.35.y/include/linux/seqlock.h @@ -88,12 +88,12 @@ static __always_inline unsigned read_seq unsigned ret; repeat: - ret = sl->sequence; - smp_rmb(); + ret = ACCESS_ONCE(sl->sequence); if (unlikely(ret & 1)) { cpu_relax(); goto repeat; } + smp_rmb(); return ret; }