lkml.org 
[lkml]   [2015]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH RFC 09/13] exit: Use for_each_thread() in do_wait()
From
Date
Refactoring, no functionality change.

Signed-off-by: Kirill Tkhai <ktkhai@odin.com>
---
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:




\
 
 \ /
  Last update: 2015-05-25 20:21    [W:0.065 / U:0.908 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site