Merge branch 'for-linus-v3.20' of git://git.infradead.org/linux-ubifs
[linux-2.6-block.git] / kernel / exit.c
index 6806c55475eec17be40b1d6c53cf9fe007376279..feff10bbb30777f93c33369a186650a6eb1a2e6a 100644 (file)
@@ -435,7 +435,8 @@ static void exit_mm(struct task_struct *tsk)
        task_unlock(tsk);
        mm_update_next_owner(mm);
        mmput(mm);
-       clear_thread_flag(TIF_MEMDIE);
+       if (test_thread_flag(TIF_MEMDIE))
+               unmark_oom_victim();
 }
 
 static struct task_struct *find_alive_thread(struct task_struct *p)