diff options
Diffstat (limited to 'kernel/locking')
| -rw-r--r-- | kernel/locking/mutex.c | 8 |
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) | |||
| 250 | rcu_read_unlock(); | 250 | rcu_read_unlock(); |
| 251 | 251 | ||
| 252 | /* | 252 | /* |
| 253 | * We break out the loop above on need_resched() and when the | 253 | * We break out of the loop above on either need_resched(), when |
| 254 | * owner changed, which is a sign for heavy contention. Return | 254 | * the owner is not running, or when the lock owner changed. |
| 255 | * success only when lock->owner is NULL. | 255 | * Return success only when the lock owner changed. |
| 256 | */ | 256 | */ |
| 257 | return lock->owner == NULL; | 257 | return lock->owner != owner; |
| 258 | } | 258 | } |
| 259 | 259 | ||
| 260 | /* | 260 | /* |
