mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-09-22 04:32:41 +00:00
[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>
This commit is contained in:
parent
75bcc8c5e1
commit
13e4b57f6a
2 changed files with 2 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue