aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kernel/locking/mutex.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/locking/mutex.c b/kernel/locking/mutex.c
index 94674e5919cb..49cce442f3ff 100644
--- a/kernel/locking/mutex.c
+++ b/kernel/locking/mutex.c
@@ -250,11 +250,11 @@ int mutex_spin_on_owner(struct mutex *lock, struct task_struct *owner)
rcu_read_unlock();
/*
- * We break out the loop above on need_resched() and when the
- * owner changed, which is a sign for heavy contention. Return
- * success only when lock->owner is NULL.
+ * We break out of the loop above on either need_resched(), when
+ * the owner is not running, or when the lock owner changed.
+ * Return success only when the lock owner changed.
*/
- return lock->owner == NULL;
+ return lock->owner != owner;
}
/*