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 --- devel/mm/oom_kill.c~mm-fix-up-schedule_timeout-usage 2005-09-03 16:20:27.000000000 -0700 +++ devel-akpm/mm/oom_kill.c 2005-09-03 16:20:27.000000000 -0700 @@ -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 -puN mm/swapfile.c~mm-fix-up-schedule_timeout-usage mm/swapfile.c --- devel/mm/swapfile.c~mm-fix-up-schedule_timeout-usage 2005-09-03 16:20:27.000000000 -0700 +++ devel-akpm/mm/swapfile.c 2005-09-03 16:20:27.000000000 -0700 @@ -1153,8 +1153,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); } _