From: Pavel Begunkov Date: Mon, 17 May 2021 13:30:12 +0000 (+0100) Subject: futex: Deduplicate cond_resched() invocation in futex_wake_op() X-Git-Tag: block-5.14-2021-07-08~87^2~48 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=a82adc7650044b5555d65078bda07866efa4a73d;p=linux-block.git futex: Deduplicate cond_resched() invocation in futex_wake_op() After pagefaulting in futex_wake_op() both branches do cond_resched() before retry. Deduplicate it as compilers cannot figure it out themself. Signed-off-by: Pavel Begunkov Signed-off-by: Thomas Gleixner Reviewed-by: Davidlohr Bueso Link: https://lore.kernel.org/r/9b2588c1fd33c91fb01c4e348a3b647ab2c8baab.1621258128.git.asml.silence@gmail.com --- diff --git a/kernel/futex.c b/kernel/futex.c index 2f386f012900..08008c225bec 100644 --- a/kernel/futex.c +++ b/kernel/futex.c @@ -1728,12 +1728,9 @@ retry_private: return ret; } - if (!(flags & FLAGS_SHARED)) { - cond_resched(); - goto retry_private; - } - cond_resched(); + if (!(flags & FLAGS_SHARED)) + goto retry_private; goto retry; }