| @@ -938,8 +938,6 @@ takeit: · 937 unmodified lines |
| 938 | 938 | */ |
| 939 | 939 | rt_mutex_set_owner(lock, task); |
| 940 | 940 | |
| 941 | | − rt_mutex_deadlock_account_lock(lock, task); |
| 942 | | − |
| 943 | 941 | return 1; |
| 944 | 942 | } |
| 945 | 943 | |
| @@ -1342,8 +1340,6 @@ static bool __sched rt_mutex_slowunlock(struct rt_mutex *lock, · 396 unmodified lines |
| 1342 | 1340 | |
| 1343 | 1341 | debug_rt_mutex_unlock(lock); |
| 1344 | 1342 | |
| 1345 | | − rt_mutex_deadlock_account_unlock(current); |
| 1346 | | − |
| 1347 | 1343 | /* |
| 1348 | 1344 | * We must be careful here if the fast path is enabled. If we |
| 1349 | 1345 | * have no waiters queued we cannot set owner to NULL here |
| @@ -1409,11 +1405,10 @@ rt_mutex_fastlock(struct rt_mutex *lock, int state, · 59 unmodified lines |
| 1409 | 1405 | struct hrtimer_sleeper *timeout, |
| 1410 | 1406 | enum rtmutex_chainwalk chwalk)) |
| 1411 | 1407 | { |
| 1412 | | − if (likely(rt_mutex_cmpxchg_acquire(lock, NULL, current))) { |
| 1413 | | − rt_mutex_deadlock_account_lock(lock, current); |
| 1408 | + if (likely(rt_mutex_cmpxchg_acquire(lock, NULL, current))) |
| 1414 | 1409 | return 0; |
| 1415 | | − } else |
| 1416 | | − return slowfn(lock, state, NULL, RT_MUTEX_MIN_CHAINWALK); |
| 1410 | + |
| 1411 | + return slowfn(lock, state, NULL, RT_MUTEX_MIN_CHAINWALK); |
| 1417 | 1412 | } |
| 1418 | 1413 | |
| 1419 | 1414 | static inline int |
| @@ -1425,21 +1420,19 @@ rt_mutex_timed_fastlock(struct rt_mutex *lock, int state, · 5 unmodified lines |
| 1425 | 1420 | enum rtmutex_chainwalk chwalk)) |
| 1426 | 1421 | { |
| 1427 | 1422 | if (chwalk == RT_MUTEX_MIN_CHAINWALK && |
| 1428 | | − likely(rt_mutex_cmpxchg_acquire(lock, NULL, current))) { |
| 1429 | | − rt_mutex_deadlock_account_lock(lock, current); |
| 1423 | + likely(rt_mutex_cmpxchg_acquire(lock, NULL, current))) |
| 1430 | 1424 | return 0; |
| 1431 | | − } else |
| 1432 | | − return slowfn(lock, state, timeout, chwalk); |
| 1425 | + |
| 1426 | + return slowfn(lock, state, timeout, chwalk); |
| 1433 | 1427 | } |
| 1434 | 1428 | |
| 1435 | 1429 | static inline int |
| 1436 | 1430 | rt_mutex_fasttrylock(struct rt_mutex *lock, |
| 1437 | 1431 | int (*slowfn)(struct rt_mutex *lock)) |
| 1438 | 1432 | { |
| 1439 | | − if (likely(rt_mutex_cmpxchg_acquire(lock, NULL, current))) { |
| 1440 | | − rt_mutex_deadlock_account_lock(lock, current); |
| 1433 | + if (likely(rt_mutex_cmpxchg_acquire(lock, NULL, current))) |
| 1441 | 1434 | return 1; |
| 1442 | | − } |
| 1435 | + |
| 1443 | 1436 | return slowfn(lock); |
| 1444 | 1437 | } |
| 1445 | 1438 | |
| @@ -1449,19 +1442,18 @@ rt_mutex_fastunlock(struct rt_mutex *lock, · 3 unmodified lines |
| 1449 | 1442 | struct wake_q_head *wqh)) |
| 1450 | 1443 | { |
| 1451 | 1444 | DEFINE_WAKE_Q(wake_q); |
| 1445 | + bool deboost; |
| 1452 | 1446 | |
| 1453 | | − if (likely(rt_mutex_cmpxchg_release(lock, current, NULL))) { |
| 1454 | | − rt_mutex_deadlock_account_unlock(current); |
| 1447 | + if (likely(rt_mutex_cmpxchg_release(lock, current, NULL))) |
| 1448 | + return; |
| 1455 | 1449 | |
| 1456 | | − } else { |
| 1457 | | − bool deboost = slowfn(lock, &wake_q); |
| 1450 | + deboost = slowfn(lock, &wake_q); |
| 1458 | 1451 | |
| 1459 | | − wake_up_q(&wake_q); |
| 1452 | + wake_up_q(&wake_q); |
| 1460 | 1453 | |
| 1461 | | − /* Undo pi boosting if necessary: */ |
| 1462 | | − if (deboost) |
| 1463 | | − rt_mutex_adjust_prio(current); |
| 1464 | | − } |
| 1454 | + /* Undo pi boosting if necessary: */ |
| 1455 | + if (deboost) |
| 1456 | + rt_mutex_adjust_prio(current); |
| 1465 | 1457 | } |
| 1466 | 1458 | |
| 1467 | 1459 | /** |
| @@ -1572,10 +1564,9 @@ EXPORT_SYMBOL_GPL(rt_mutex_unlock); · 104 unmodified lines |
| 1572 | 1564 | bool __sched rt_mutex_futex_unlock(struct rt_mutex *lock, |
| 1573 | 1565 | struct wake_q_head *wqh) |
| 1574 | 1566 | { |
| 1575 | | − if (likely(rt_mutex_cmpxchg_release(lock, current, NULL))) { |
| 1576 | | − rt_mutex_deadlock_account_unlock(current); |
| 1567 | + if (likely(rt_mutex_cmpxchg_release(lock, current, NULL))) |
| 1577 | 1568 | return false; |
| 1578 | | − } |
| 1569 | + |
| 1579 | 1570 | return rt_mutex_slowunlock(lock, wqh); |
| 1580 | 1571 | } |
| 1581 | 1572 | |
| @@ -1637,7 +1628,6 @@ void rt_mutex_init_proxy_locked(struct rt_mutex *lock, · 55 unmodified lines |
| 1637 | 1628 | __rt_mutex_init(lock, NULL); |
| 1638 | 1629 | debug_rt_mutex_proxy_lock(lock, proxy_owner); |
| 1639 | 1630 | rt_mutex_set_owner(lock, proxy_owner); |
| 1640 | | − rt_mutex_deadlock_account_lock(lock, proxy_owner); |
| 1641 | 1631 | } |
| 1642 | 1632 | |
| 1643 | 1633 | /** |
| @@ -1657,7 +1647,6 @@ void rt_mutex_proxy_unlock(struct rt_mutex *lock, · 13 unmodified lines |
| 1657 | 1647 | { |
| 1658 | 1648 | debug_rt_mutex_proxy_unlock(lock); |
| 1659 | 1649 | rt_mutex_set_owner(lock, NULL); |
| 1660 | | − rt_mutex_deadlock_account_unlock(proxy_owner); |
| 1661 | 1650 | } |
| 1662 | 1651 | |
| 1663 | 1652 | /** |