Commit df1090a8 authored by KOSAKI Motohiro's avatar KOSAKI Motohiro Committed by Linus Torvalds

oom: cleanup has_intersects_mems_allowed()

presently has_intersects_mems_allowed() has own thread iterate logic, but
it should use while_each_thread().

It slightly improve the code readability.
Signed-off-by: default avatarKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Reviewed-by: default avatarMinchan Kim <minchan.kim@gmail.com>
Cc: David Rientjes <rientjes@google.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent a96cfd6e
...@@ -69,8 +69,8 @@ static bool has_intersects_mems_allowed(struct task_struct *tsk, ...@@ -69,8 +69,8 @@ static bool has_intersects_mems_allowed(struct task_struct *tsk,
if (cpuset_mems_allowed_intersects(current, tsk)) if (cpuset_mems_allowed_intersects(current, tsk))
return true; return true;
} }
tsk = next_thread(tsk); } while_each_thread(start, tsk);
} while (tsk != start);
return false; return false;
} }
#else #else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment