diff options
Diffstat (limited to 'kernel/locking/rwsem-xadd.c')
-rw-r--r-- | kernel/locking/rwsem-xadd.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/locking/rwsem-xadd.c b/kernel/locking/rwsem-xadd.c index 3417d0172a5d..873ffca2321c 100644 --- a/kernel/locking/rwsem-xadd.c +++ b/kernel/locking/rwsem-xadd.c | |||
@@ -18,6 +18,8 @@ | |||
18 | 18 | ||
19 | #include "rwsem.h" | 19 | #include "rwsem.h" |
20 | 20 | ||
21 | #include <litmus/litmus.h> /* for is_realtime() */ | ||
22 | |||
21 | /* | 23 | /* |
22 | * Guide to the rw_semaphore's count field for common values. | 24 | * Guide to the rw_semaphore's count field for common values. |
23 | * (32-bit case illustrated, similar for 64-bit) | 25 | * (32-bit case illustrated, similar for 64-bit) |
@@ -392,7 +394,7 @@ static bool rwsem_optimistic_spin(struct rw_semaphore *sem) | |||
392 | * we're an RT task that will live-lock because we won't let | 394 | * we're an RT task that will live-lock because we won't let |
393 | * the owner complete. | 395 | * the owner complete. |
394 | */ | 396 | */ |
395 | if (!owner && (need_resched() || rt_task(current))) | 397 | if (!owner && (need_resched() || rt_task(current) || is_realtime(current))) |
396 | break; | 398 | break; |
397 | 399 | ||
398 | /* | 400 | /* |