From: Christoph Lameter Date: Wed, 28 Aug 2024 22:02:23 +0000 (-0700) Subject: wait for power X-Git-Url: https://gentwo.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fv3;p=linux%2F.git wait for power --- diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h index 68b3af8bd6c6..4442a97ffe9a 100644 --- a/include/linux/seqlock.h +++ b/include/linux/seqlock.h @@ -135,7 +135,7 @@ static inline void seqcount_lockdep_reader_access(const seqcount_t *s) static __always_inline unsigned __seqprop_load_sequence(const seqcount_t *s, bool acquire) { if (acquire && IS_ENABLED(CONFIG_ARCH_HAS_ACQUIRE_RELEASE)) - return smp_load_acquire(&s->sequence); + return smp_cond_load_acquire(&s->sequence, (s->sequence & 1) == 0); else return READ_ONCE(s->sequence); }