From: Thomas Gleixner Date: Sun, 15 Aug 2021 21:29:09 +0000 (+0200) Subject: futex: Remove bogus condition for requeue PI X-Git-Tag: accepted/tizen/unified/20230118.172025~6489^2~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8e74633dcefb280f2cefb49b7201d99650243d96;p=platform%2Fkernel%2Flinux-rpi.git futex: Remove bogus condition for requeue PI For requeue PI it's required to establish PI state for the PI futex to which waiters are requeued. This either acquires the user space futex on behalf of the top most waiter on the inner 'waitqueue' futex, or attaches to the PI state of an existing waiter, or creates on attached to the owner of the futex. This code can retry in case of failure, but retry can never happen when the pi state was successfully created. The condition to run this code is: (task_count - nr_wake) < nr_requeue which is always true because: task_count = 0 nr_wake = 1 nr_requeue >= 0 Remove it completely. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210815211305.362730187@linutronix.de --- diff --git a/kernel/futex.c b/kernel/futex.c index c39d5f1..8ddc87c 100644 --- a/kernel/futex.c +++ b/kernel/futex.c @@ -2000,7 +2000,7 @@ retry_private: } } - if (requeue_pi && (task_count - nr_wake < nr_requeue)) { + if (requeue_pi) { struct task_struct *exiting = NULL; /*