diff --git a/kernel/locking/qspinlock.c b/kernel/locking/qspinlock.c index 56af1fa9874d81d400c1c927abb0db6b2850ff9a..d6c3b029bd935ea633dd91f75cebfe49ebb34f49 100644 --- a/kernel/locking/qspinlock.c +++ b/kernel/locking/qspinlock.c @@ -483,10 +483,8 @@ void queued_spin_lock_slowpath(struct qspinlock *lock, u32 val) /* * contended path; wait for next if not observed yet, release. */ - if (!next) { - while (!(next = READ_ONCE(node->next))) - cpu_relax(); - } + if (!next) + next = smp_cond_load_relaxed(&node->next, (VAL)); arch_mcs_spin_unlock_contended(&next->locked); pv_kick_node(lock, next);