aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2015-11-06 16:31:26 -0800
committerMoyster <oysterized@gmail.com>2019-05-02 18:14:30 +0200
commitafb8b5192ebaf9e98e5f83d12460e0d27e2800ac (patch)
tree32bc624f7b85b82b5dce1594021bd57ce6c30249
parentfa90cf917fa9875392c5f660afec1215fbdfa9de (diff)
lib/is_single_threaded.c: change current_is_single_threaded() to use for_each_thread()
Change current_is_single_threaded() to use for_each_thread() rather than deprecated while_each_thread(). Change-Id: Ie0abc34982554e4ec5e0d2a8457c9bbd386c814d Signed-off-by: Oleg Nesterov <oleg@redhat.com> Cc: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--lib/is_single_threaded.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/is_single_threaded.c b/lib/is_single_threaded.c
index bd2bea963..391fd2397 100644
--- a/lib/is_single_threaded.c
+++ b/lib/is_single_threaded.c
@@ -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))
@@ -48,7 +47,7 @@ bool current_is_single_threaded(void)
* forked before exiting.
*/
smp_rmb();
- } while_each_thread(p, t);
+ }
}
ret = true;
found: