diff options
author | Nishanth Aravamudan <nacc@us.ibm.com> | 2005-09-10 03:27:25 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-10 13:06:37 -0400 |
commit | 13e4b57f6a4e23ceb99794a650d777e74831f4a6 (patch) | |
tree | a585fdc3a2374dbedcf0114fa3c38d2fb7920774 /mm | |
parent | 75bcc8c5e1de78616b04ef9f317a293a7c1c163c (diff) |
[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 <nacc@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/oom_kill.c | 3 | ||||
-rw-r--r-- | mm/swapfile.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 5ec8da12cfd9..ac3bf33e5370 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c | |||
@@ -300,6 +300,5 @@ retry: | |||
300 | * Give "p" a good chance of killing itself before we | 300 | * Give "p" a good chance of killing itself before we |
301 | * retry to allocate memory. | 301 | * retry to allocate memory. |
302 | */ | 302 | */ |
303 | __set_current_state(TASK_INTERRUPTIBLE); | 303 | schedule_timeout_interruptible(1); |
304 | schedule_timeout(1); | ||
305 | } | 304 | } |
diff --git a/mm/swapfile.c b/mm/swapfile.c index 4b6e8bf986bc..0184f510aace 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c | |||
@@ -1153,8 +1153,7 @@ asmlinkage long sys_swapoff(const char __user * specialfile) | |||
1153 | p->highest_bit = 0; /* cuts scans short */ | 1153 | p->highest_bit = 0; /* cuts scans short */ |
1154 | while (p->flags >= SWP_SCANNING) { | 1154 | while (p->flags >= SWP_SCANNING) { |
1155 | spin_unlock(&swap_lock); | 1155 | spin_unlock(&swap_lock); |
1156 | set_current_state(TASK_UNINTERRUPTIBLE); | 1156 | schedule_timeout_uninterruptible(1); |
1157 | schedule_timeout(1); | ||
1158 | spin_lock(&swap_lock); | 1157 | spin_lock(&swap_lock); |
1159 | } | 1158 | } |
1160 | 1159 | ||