From: Nishanth Aravamudan Use schedule_timeout_{,un}interruptible() instead of set_current_state()/schedule_timeout() to reduce kernel size. (akpm: this patch relies on other stuff in -mm, please don't apply) Signed-off-by: Nishanth Aravamudan Signed-off-by: Andrew Morton --- mm/oom_kill.c | 3 +-- mm/swapfile.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff -puN mm/oom_kill.c~mm-fix-up-schedule_timeout-usage mm/oom_kill.c --- 25/mm/oom_kill.c~mm-fix-up-schedule_timeout-usage Wed Aug 17 17:00:17 2005 +++ 25-akpm/mm/oom_kill.c Wed Aug 17 17:00:17 2005 @@ -290,6 +290,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 -puN mm/swapfile.c~mm-fix-up-schedule_timeout-usage mm/swapfile.c --- 25/mm/swapfile.c~mm-fix-up-schedule_timeout-usage Wed Aug 17 17:00:17 2005 +++ 25-akpm/mm/swapfile.c Wed Aug 17 17:00:17 2005 @@ -1150,8 +1150,7 @@ asmlinkage long sys_swapoff(const char _ 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); } _