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 <asml.silence@gmail.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Davidlohr Bueso <dbueso@suse.de> Link: https://lore.kernel.org/r/9b2588c1fd33c91fb01c4e348a3b647ab2c8baab.1621258128.git.asml.silence@gmail.com
This commit is contained in:
parent
f4addd54b1
commit
a82adc7650
1 changed files with 2 additions and 5 deletions
|
@ -1728,12 +1728,9 @@ futex_wake_op(u32 __user *uaddr1, unsigned int flags, u32 __user *uaddr2,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(flags & FLAGS_SHARED)) {
|
|
||||||
cond_resched();
|
cond_resched();
|
||||||
|
if (!(flags & FLAGS_SHARED))
|
||||||
goto retry_private;
|
goto retry_private;
|
||||||
}
|
|
||||||
|
|
||||||
cond_resched();
|
|
||||||
goto retry;
|
goto retry;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue