mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 22:37:45 -04:00
mm: oom_kill: switch test-and-clear of known TIF_MEMDIE to clear
exit_oom_victim() already knows that TIF_MEMDIE is set, and nobody else can clear it concurrently. Use clear_thread_flag() directly. Signed-off-by: Johannes Weiner <[email protected]> Acked-by: David Rientjes <[email protected]> Acked-by: Michal Hocko <[email protected]> Cc: Tetsuo Handa <[email protected]> Cc: Andrea Arcangeli <[email protected]> Cc: Dave Chinner <[email protected]> Cc: Vlastimil Babka <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
1 parent
16e951966f
commit
464027785f
1 file changed
+1
-2
+1
-2
@@ -435,8 +435,7 @@ void mark_oom_victim(struct task_struct *tsk)
|
||||
*/
|
||||
void exit_oom_victim(void)
|
||||
{
|
||||
if (!test_and_clear_thread_flag(TIF_MEMDIE))
|
||||
return;
|
||||
clear_thread_flag(TIF_MEMDIE);
|
||||
|
||||
down_read(&oom_sem);
|
||||
/*
|
||||
|
||||
Reference in new issue
Block a user