Simplify the for loop a bit. Signed-off-by: Uros Bizjak <ubizjak@xxxxxxxxx> Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Cc: Oleg Nestrov <oleg@xxxxxxxxxx> --- kernel/fork.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kernel/fork.c b/kernel/fork.c index c9e994d66930..f1c16b3dd8ac 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -207,9 +207,8 @@ static bool try_release_thread_stack_to_cache(struct vm_struct *vm) for (i = 0; i < NR_CACHED_STACKS; i++) { struct vm_struct *tmp = NULL; - if (!this_cpu_try_cmpxchg(cached_stacks[i], &tmp, vm)) - continue; - return true; + if (this_cpu_try_cmpxchg(cached_stacks[i], &tmp, vm)) + return true; } return false; } -- 2.42.0