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: 57750518de ("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:35:39 +08:00 committed by Treehugger Robot
parent 3fc69d3f70
commit fadc35923d

View File

@ -556,8 +556,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);