ANDROID: vendor_hook: fix the error record position of mutex

Make sure vendorhook trace_android_vh_record_mutex_lock_starttime woking both in fastpath unlock and slowpath unlock.

Fixes: 57750518de5b ("ANDROID: vendor_hook: Avoid clearing protect-flag before waking waiters")
Bug: 286024926
Change-Id: Ib91c1b88d27aaa4ef872d44102969ffc3c9adb58
Signed-off-by: xieliujie <xieliujie@oppo.com>
This commit is contained in:
xieliujie 2023-08-04 14:12:55 +08:00 committed by Treehugger Robot
parent 028e0fb3a4
commit ec3f57af0a

View File

@ -761,8 +761,10 @@ static noinline void __sched __mutex_unlock_slowpath(struct mutex *lock, unsigne
void __sched mutex_unlock(struct mutex *lock)
{
#ifndef CONFIG_DEBUG_LOCK_ALLOC
if (__mutex_unlock_fast(lock))
if (__mutex_unlock_fast(lock)) {
trace_android_vh_record_mutex_lock_starttime(current, 0);
return;
}
#endif
__mutex_unlock_slowpath(lock, _RET_IP_);
trace_android_vh_record_mutex_lock_starttime(current, 0);