Skip to content

Commit

Permalink
lib/is_single_threaded.c: change current_is_single_threaded() to use …
Browse files Browse the repository at this point in the history
…for_each_thread()

Change current_is_single_threaded() to use for_each_thread() rather than
deprecated while_each_thread().

Signed-off-by: Oleg Nesterov <[email protected]>
Cc: David Howells <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
oleg-nesterov authored and torvalds committed Nov 7, 2015
1 parent f773f32 commit 9022435
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/is_single_threaded.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ bool current_is_single_threaded(void)
if (unlikely(p == task->group_leader))
continue;

t = p;
do {
for_each_thread(p, t) {
if (unlikely(t->mm == mm))
goto found;
if (likely(t->mm))
Expand All @@ -48,7 +47,7 @@ bool current_is_single_threaded(void)
* forked before exiting.
*/
smp_rmb();
} while_each_thread(p, t);
}
}
ret = true;
found:
Expand Down

0 comments on commit 9022435

Please sign in to comment.