diff options
Diffstat (limited to 'kernel/locking')
| -rw-r--r-- | kernel/locking/mcs_spinlock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/locking/mcs_spinlock.c b/kernel/locking/mcs_spinlock.c index 32fc16c0a545..be9ee1559fca 100644 --- a/kernel/locking/mcs_spinlock.c +++ b/kernel/locking/mcs_spinlock.c | |||
| @@ -182,8 +182,7 @@ unqueue: | |||
| 182 | 182 | ||
| 183 | void osq_unlock(struct optimistic_spin_queue *lock) | 183 | void osq_unlock(struct optimistic_spin_queue *lock) |
| 184 | { | 184 | { |
| 185 | struct optimistic_spin_node *node = this_cpu_ptr(&osq_node); | 185 | struct optimistic_spin_node *node, *next; |
| 186 | struct optimistic_spin_node *next; | ||
| 187 | int curr = encode_cpu(smp_processor_id()); | 186 | int curr = encode_cpu(smp_processor_id()); |
| 188 | 187 | ||
| 189 | /* | 188 | /* |
| @@ -195,6 +194,7 @@ void osq_unlock(struct optimistic_spin_queue *lock) | |||
| 195 | /* | 194 | /* |
| 196 | * Second most likely case. | 195 | * Second most likely case. |
| 197 | */ | 196 | */ |
| 197 | node = this_cpu_ptr(&osq_node); | ||
| 198 | next = xchg(&node->next, NULL); | 198 | next = xchg(&node->next, NULL); |
| 199 | if (next) { | 199 | if (next) { |
| 200 | ACCESS_ONCE(next->locked) = 1; | 200 | ACCESS_ONCE(next->locked) = 1; |
