Commit 6ac0a268 authored by Jing Xia's avatar Jing Xia Committed by Treehugger Robot
Browse files

ANDROID: vendor_hooks: Add android_vh_rwsem_downgrade_wake_finish to rwsem_downgrade_wake



The commit d4528a28 ("ANDROID: vendor_hooks: Add hooks for
rwsem and mutex") adds the android_vh_rwsem_wake_finish hook to
rwsem_wake().It can get the point when a [write/read]_owner
releases the rwsem and wakes up other waiters of the rwsem.
However, it cannot cover a scenario that a task acquires the
write-lock first, then downgrades to the read-lock and wakes up
other waiters in list.

In order to avoid breaking other partner handlers that don't
expect to be called from rwsem_downgrade_wake,this patch adds
a new vendor hook named android_vh_rwsem_downgrade_wake_finish
to rwsem_downgrade_wake() as Todd Kjos suggested.

Bug: 319178409
Change-Id: I73f677d2aa813777f21f13fafc17b1f912f6ef7e
Signed-off-by: default avatarJing Xia <jing.xia@unisoc.com>
parent b5cd0ba9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment