]> Gentwo Git Trees - linux/.git/commitdiff
wait for power v3
authorChristoph Lameter <cl@gentwo.org>
Wed, 28 Aug 2024 22:02:23 +0000 (15:02 -0700)
committerChristoph Lameter <cl@gentwo.org>
Wed, 28 Aug 2024 22:02:23 +0000 (15:02 -0700)
include/linux/seqlock.h

index 68b3af8bd6c604e443d07f533c11c239fd22b97c..4442a97ffe9a3fbcda427d884da7425f98a3fb72 100644 (file)
@@ -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);
 }