@@ -938,8 +938,6 @@ static int try_to_take_rt_mutex(struct rt_mutex *lock, struct task_struct *task,
938938 */
939939 rt_mutex_set_owner (lock , task );
940940
941- rt_mutex_deadlock_account_lock (lock , task );
942-
943941 return 1 ;
944942}
945943
@@ -1342,8 +1340,6 @@ static bool __sched rt_mutex_slowunlock(struct rt_mutex *lock,
13421340
13431341 debug_rt_mutex_unlock (lock );
13441342
1345- rt_mutex_deadlock_account_unlock (current );
1346-
13471343 /*
13481344 * We must be careful here if the fast path is enabled. If we
13491345 * have no waiters queued we cannot set owner to NULL here
@@ -1409,11 +1405,10 @@ rt_mutex_fastlock(struct rt_mutex *lock, int state,
14091405 struct hrtimer_sleeper * timeout ,
14101406 enum rtmutex_chainwalk chwalk ))
14111407{
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 )))
14141409 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 );
14171412}
14181413
14191414static inline int
@@ -1425,21 +1420,19 @@ rt_mutex_timed_fastlock(struct rt_mutex *lock, int state,
14251420 enum rtmutex_chainwalk chwalk ))
14261421{
14271422 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 )))
14301424 return 0 ;
1431- } else
1432- return slowfn (lock , state , timeout , chwalk );
1425+
1426+ return slowfn (lock , state , timeout , chwalk );
14331427}
14341428
14351429static inline int
14361430rt_mutex_fasttrylock (struct rt_mutex * lock ,
14371431 int (* slowfn )(struct rt_mutex * lock ))
14381432{
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 )))
14411434 return 1 ;
1442- }
1435+
14431436 return slowfn (lock );
14441437}
14451438
@@ -1449,19 +1442,18 @@ rt_mutex_fastunlock(struct rt_mutex *lock,
14491442 struct wake_q_head * wqh ))
14501443{
14511444 DEFINE_WAKE_Q (wake_q );
1445+ bool deboost ;
14521446
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 ;
14551449
1456- } else {
1457- bool deboost = slowfn (lock , & wake_q );
1450+ deboost = slowfn (lock , & wake_q );
14581451
1459- wake_up_q (& wake_q );
1452+ wake_up_q (& wake_q );
14601453
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 );
14651457}
14661458
14671459/**
@@ -1572,10 +1564,9 @@ EXPORT_SYMBOL_GPL(rt_mutex_unlock);
15721564bool __sched rt_mutex_futex_unlock (struct rt_mutex * lock ,
15731565 struct wake_q_head * wqh )
15741566{
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 )))
15771568 return false;
1578- }
1569+
15791570 return rt_mutex_slowunlock (lock , wqh );
15801571}
15811572
@@ -1637,7 +1628,6 @@ void rt_mutex_init_proxy_locked(struct rt_mutex *lock,
16371628 __rt_mutex_init (lock , NULL );
16381629 debug_rt_mutex_proxy_lock (lock , proxy_owner );
16391630 rt_mutex_set_owner (lock , proxy_owner );
1640- rt_mutex_deadlock_account_lock (lock , proxy_owner );
16411631}
16421632
16431633/**
@@ -1657,7 +1647,6 @@ void rt_mutex_proxy_unlock(struct rt_mutex *lock,
16571647{
16581648 debug_rt_mutex_proxy_unlock (lock );
16591649 rt_mutex_set_owner (lock , NULL );
1660- rt_mutex_deadlock_account_unlock (proxy_owner );
16611650}
16621651
16631652/**
0 commit comments