Skip to content

Commit df1090a

Browse files
kosakitorvalds
authored andcommitted
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 <[email protected]> Reviewed-by: Minchan Kim <[email protected]> Cc: David Rientjes <[email protected]> Cc: KAMEZAWA Hiroyuki <[email protected]> Cc: Oleg Nesterov <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent a96cfd6 commit df1090a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mm/oom_kill.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ static bool has_intersects_mems_allowed(struct task_struct *tsk,
6969
if (cpuset_mems_allowed_intersects(current, tsk))
7070
return true;
7171
}
72-
tsk = next_thread(tsk);
73-
} while (tsk != start);
72+
} while_each_thread(start, tsk);
73+
7474
return false;
7575
}
7676
#else

0 commit comments

Comments
 (0)