futex: deduplicate resched in futex_wake_op()
PATCH 1/1 futex: deduplicate resched in futex_wake_op()
After pagefaulting in futex_wake_op() both branches do cond_resched() before retry. Help to deduplicate it as many compilers can't cope with it.
Signed-off-by Pavel Begunkov <[email protected]>
--- kernel/futex.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
kernel/futex.c +2 -5
@@ -1728,12 +1728,9 @@ futex_wake_op(u32 __user *uaddr1, unsigned int flags, u32 __user *uaddr2,return ret; } -if (!(flags &FLAGS_SHARED )) { -cond_resched (); - goto retry_private; - } -cond_resched (); +if (!(flags &FLAGS_SHARED )) + goto retry_private; goto retry; }
Signature · 1 line
2.31.1
Quoted 4 lines · Pavel Begunkov
After pagefaulting in
futex_wake_op()both branches docond_resched()before retry. Help to deduplicate it as many compilers can't cope with it.
LGTM:
Reviewed-by Davidlohr Bueso <[email protected]>
Quoted 27 lines
Signed-off-by Pavel Begunkov <[email protected]>---
kernel/futex.c| 7 ++-----1 file changed, 2 insertions(+), 5 deletions(-)kernel/futex.c +2
-5@@ -1728,12 +1728,9 @@ futex_wake_op(u32 __user *uaddr1, unsigned int flags, u32 __user *uaddr2,return ret; } -if (!(flags &FLAGS_SHARED )) { -cond_resched (); - goto retry_private; - } -cond_resched (); +if (!(flags &FLAGS_SHARED )) + goto retry_private; goto retry; }Signature · 1 line
2.31.1