提交 13e4b57f 编写于 作者: N Nishanth Aravamudan 提交者: Linus Torvalds

[PATCH] mm: fix-up schedule_timeout() usage

Use schedule_timeout_{,un}interruptible() instead of
set_current_state()/schedule_timeout() to reduce kernel size.
Signed-off-by: NNishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 75bcc8c5
......@@ -300,6 +300,5 @@ void out_of_memory(unsigned int __nocast gfp_mask, int order)
* Give "p" a good chance of killing itself before we
* retry to allocate memory.
*/
__set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(1);
schedule_timeout_interruptible(1);
}
......@@ -1153,8 +1153,7 @@ asmlinkage long sys_swapoff(const char __user * specialfile)
p->highest_bit = 0; /* cuts scans short */
while (p->flags >= SWP_SCANNING) {
spin_unlock(&swap_lock);
set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(1);
schedule_timeout_uninterruptible(1);
spin_lock(&swap_lock);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册