From: KOSAKI Motohiro Date: Tue, 10 Aug 2010 00:19:39 +0000 (-0700) Subject: oom: cleanup has_intersects_mems_allowed() X-Git-Tag: accepted/tizen/common/20141203.182822~10773 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=df1090a8dda40b6e11d8cd09e8fc900cfe913b38;p=platform%2Fkernel%2Flinux-arm64.git 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: KOSAKI Motohiro Reviewed-by: Minchan Kim Cc: David Rientjes Cc: KAMEZAWA Hiroyuki Cc: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 79b3483..342d433 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -69,8 +69,8 @@ static bool has_intersects_mems_allowed(struct task_struct *tsk, if (cpuset_mems_allowed_intersects(current, tsk)) return true; } - tsk = next_thread(tsk); - } while (tsk != start); + } while_each_thread(start, tsk); + return false; } #else