Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751597AbbEYRpx (ORCPT ); Mon, 25 May 2015 13:45:53 -0400 Received: from relay.parallels.com ([195.214.232.42]:44299 "EHLO relay.parallels.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750903AbbEYRpq (ORCPT ); Mon, 25 May 2015 13:45:46 -0400 Message-ID: <1432575941.6866.42.camel@odin.com> Subject: [PATCH RFC 09/13] exit: Use for_each_thread() in do_wait() From: Kirill Tkhai To: CC: Oleg Nesterov , Andrew Morton , Ingo Molnar , "Peter Zijlstra" , Michal Hocko , "Rik van Riel" , Ionut Alexa , Peter Hurley , Kirill Tkhai Date: Mon, 25 May 2015 20:45:41 +0300 In-Reply-To: <20150525162722.5171.15901.stgit@pro> References: <20150525162722.5171.15901.stgit@pro> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.9-1+b1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Originating-IP: [10.30.16.109] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 983 Lines: 38 Refactoring, no functionality change. Signed-off-by: Kirill Tkhai --- kernel/exit.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kernel/exit.c b/kernel/exit.c index a268093..c84f3e4 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -1538,8 +1538,7 @@ static long do_wait(struct wait_opts *wo) set_current_state(TASK_INTERRUPTIBLE); read_lock(&tasklist_lock); - tsk = current; - do { + for_each_thread(current, tsk) { retval = do_wait_thread(wo, tsk); if (retval) goto end; @@ -1550,7 +1549,7 @@ static long do_wait(struct wait_opts *wo) if (wo->wo_flags & __WNOTHREAD) break; - } while_each_thread(current, tsk); + } read_unlock(&tasklist_lock); notask: -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/