diff options
| author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-04-26 15:20:22 -0400 |
|---|---|---|
| committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-04-26 15:20:22 -0400 |
| commit | 52056e94a94517e250f7f4e36e7470a4b002404e (patch) | |
| tree | 643a384bde05986b5d48678e71b7eee19ab12ef4 | |
| parent | 040301747953ae9a2017def70e6004affe1e9aeb (diff) | |
No-op useless unlock calls.
| -rw-r--r-- | litmus/nvidia_info.c | 4 | ||||
| -rw-r--r-- | litmus/rsm_lock.c | 8 |
2 files changed, 5 insertions, 7 deletions
diff --git a/litmus/nvidia_info.c b/litmus/nvidia_info.c index 889313c854e6..3d8c50882066 100644 --- a/litmus/nvidia_info.c +++ b/litmus/nvidia_info.c | |||
| @@ -482,7 +482,9 @@ static int __clear_reg_nv_device(int de_reg_device_id, struct task_struct *t) | |||
| 482 | struct task_struct* klitirqd_th = get_klitirqd(de_reg_device_id); | 482 | struct task_struct* klitirqd_th = get_klitirqd(de_reg_device_id); |
| 483 | #endif | 483 | #endif |
| 484 | 484 | ||
| 485 | WARN_ON(!test_bit(de_reg_device_id, &tsk_rt(t)->held_gpus)); | 485 | if(!test_bit(de_reg_device_id, &tsk_rt(t)->held_gpus)) { |
| 486 | return ret; | ||
| 487 | } | ||
| 486 | 488 | ||
| 487 | raw_spin_lock_irqsave(®->lock, flags); | 489 | raw_spin_lock_irqsave(®->lock, flags); |
| 488 | 490 | ||
diff --git a/litmus/rsm_lock.c b/litmus/rsm_lock.c index 6a4bb500c4ae..965164c43537 100644 --- a/litmus/rsm_lock.c +++ b/litmus/rsm_lock.c | |||
| @@ -338,17 +338,13 @@ int rsm_mutex_unlock(struct litmus_lock* l) | |||
| 338 | 338 | ||
| 339 | int err = 0; | 339 | int err = 0; |
| 340 | 340 | ||
| 341 | lock_global_irqsave(dgl_lock, flags); | ||
| 342 | lock_fine_irqsave(&mutex->lock, flags); | ||
| 343 | |||
| 344 | |||
| 345 | if (mutex->owner != t) { | 341 | if (mutex->owner != t) { |
| 346 | err = -EINVAL; | 342 | err = -EINVAL; |
| 347 | unlock_fine_irqrestore(&mutex->lock, flags); | ||
| 348 | unlock_global_irqrestore(dgl_lock, flags); | ||
| 349 | return err; | 343 | return err; |
| 350 | } | 344 | } |
| 351 | 345 | ||
| 346 | lock_global_irqsave(dgl_lock, flags); | ||
| 347 | lock_fine_irqsave(&mutex->lock, flags); | ||
| 352 | 348 | ||
| 353 | raw_spin_lock(&tsk_rt(t)->hp_blocked_tasks_lock); | 349 | raw_spin_lock(&tsk_rt(t)->hp_blocked_tasks_lock); |
| 354 | 350 | ||
