]> git.baikalelectronics.ru Git - kernel.git/commit
futex: Simplify double_lock_hb()
authorPeter Zijlstra <peterz@infradead.org>
Thu, 23 Sep 2021 17:11:04 +0000 (14:11 -0300)
committerPeter Zijlstra <peterz@infradead.org>
Thu, 7 Oct 2021 11:51:11 +0000 (13:51 +0200)
commit563afec55e08af163fd8970d1a44cee882c26aab
tree0e7e8366851e1f33ad0d929fb5e78e1ae026ff93
parentcd879c4e518378dad7903c7a70ad708c0a1a3b37
futex: Simplify double_lock_hb()

We need to make sure that all requeue operations take the hash bucket
locks in the same order to avoid deadlock. Simplify the current
double_lock_hb implementation by making sure hb1 is always the
"smallest" bucket to avoid extra checks.

[André: Add commit description]
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: André Almeida <andrealmeid@collabora.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: André Almeida <andrealmeid@collabora.com>
Link: https://lore.kernel.org/r/20210923171111.300673-16-andrealmeid@collabora.com
kernel/futex/futex.h