diff options
Diffstat (limited to 'kernel/rtmutex.c')
-rw-r--r-- | kernel/rtmutex.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/kernel/rtmutex.c b/kernel/rtmutex.c index 91b699aa658b..d2ef13b485e7 100644 --- a/kernel/rtmutex.c +++ b/kernel/rtmutex.c | |||
@@ -157,7 +157,7 @@ int max_lock_depth = 1024; | |||
157 | * Decreases task's usage by one - may thus free the task. | 157 | * Decreases task's usage by one - may thus free the task. |
158 | * Returns 0 or -EDEADLK. | 158 | * Returns 0 or -EDEADLK. |
159 | */ | 159 | */ |
160 | static int rt_mutex_adjust_prio_chain(task_t *task, | 160 | static int rt_mutex_adjust_prio_chain(struct task_struct *task, |
161 | int deadlock_detect, | 161 | int deadlock_detect, |
162 | struct rt_mutex *orig_lock, | 162 | struct rt_mutex *orig_lock, |
163 | struct rt_mutex_waiter *orig_waiter, | 163 | struct rt_mutex_waiter *orig_waiter, |
@@ -282,6 +282,7 @@ static int rt_mutex_adjust_prio_chain(task_t *task, | |||
282 | spin_unlock_irqrestore(&task->pi_lock, flags); | 282 | spin_unlock_irqrestore(&task->pi_lock, flags); |
283 | out_put_task: | 283 | out_put_task: |
284 | put_task_struct(task); | 284 | put_task_struct(task); |
285 | |||
285 | return ret; | 286 | return ret; |
286 | } | 287 | } |
287 | 288 | ||
@@ -403,10 +404,10 @@ static int task_blocks_on_rt_mutex(struct rt_mutex *lock, | |||
403 | struct rt_mutex_waiter *waiter, | 404 | struct rt_mutex_waiter *waiter, |
404 | int detect_deadlock) | 405 | int detect_deadlock) |
405 | { | 406 | { |
407 | struct task_struct *owner = rt_mutex_owner(lock); | ||
406 | struct rt_mutex_waiter *top_waiter = waiter; | 408 | struct rt_mutex_waiter *top_waiter = waiter; |
407 | task_t *owner = rt_mutex_owner(lock); | ||
408 | int boost = 0, res; | ||
409 | unsigned long flags; | 409 | unsigned long flags; |
410 | int boost = 0, res; | ||
410 | 411 | ||
411 | spin_lock_irqsave(¤t->pi_lock, flags); | 412 | spin_lock_irqsave(¤t->pi_lock, flags); |
412 | __rt_mutex_adjust_prio(current); | 413 | __rt_mutex_adjust_prio(current); |
@@ -527,9 +528,9 @@ static void remove_waiter(struct rt_mutex *lock, | |||
527 | struct rt_mutex_waiter *waiter) | 528 | struct rt_mutex_waiter *waiter) |
528 | { | 529 | { |
529 | int first = (waiter == rt_mutex_top_waiter(lock)); | 530 | int first = (waiter == rt_mutex_top_waiter(lock)); |
530 | int boost = 0; | 531 | struct task_struct *owner = rt_mutex_owner(lock); |
531 | task_t *owner = rt_mutex_owner(lock); | ||
532 | unsigned long flags; | 532 | unsigned long flags; |
533 | int boost = 0; | ||
533 | 534 | ||
534 | spin_lock_irqsave(¤t->pi_lock, flags); | 535 | spin_lock_irqsave(¤t->pi_lock, flags); |
535 | plist_del(&waiter->list_entry, &lock->wait_list); | 536 | plist_del(&waiter->list_entry, &lock->wait_list); |