Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 13e4b57f authored by Nishanth Aravamudan's avatar Nishanth Aravamudan Committed by Linus Torvalds
Browse files

[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: default avatarNishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 75bcc8c5
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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);
}
+1 −2
Original line number Diff line number Diff line
@@ -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);
	}