From: Nishanth Aravamudan Date: Sat, 10 Sep 2005 07:27:25 +0000 (-0700) Subject: [PATCH] mm: fix-up schedule_timeout() usage X-Git-Tag: v2.6.14-rc1~152 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=13e4b57f6a4e23ceb99794a650d777e74831f4a6;p=profile%2Fivi%2Fkernel-x86-ivi.git [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: Nishanth Aravamudan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 5ec8da1..ac3bf33 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -300,6 +300,5 @@ retry: * 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); } diff --git a/mm/swapfile.c b/mm/swapfile.c index 4b6e8bf..0184f51 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -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); }