From: Nishanth Aravamudan Date: Mon, 7 Nov 2005 09:01:14 +0000 (-0800) Subject: [PATCH] um: fix-up schedule_timeout() usage X-Git-Tag: v2.6.15-rc1~512 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc874d174b224c016adac85fc9dd6da1161ffc57;p=linux-2.6 [PATCH] um: fix-up schedule_timeout() usage Use schedule_timeout_interruptible() instead of set_current_state()/schedule_timeout() to reduce kernel size. Signed-off-by: Nishanth Aravamudan Acked-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/um/drivers/random.c b/arch/um/drivers/random.c index f9e22198e0..ba471f5864 100644 --- a/arch/um/drivers/random.c +++ b/arch/um/drivers/random.c @@ -58,10 +58,8 @@ static ssize_t rng_dev_read (struct file *filp, char __user *buf, size_t size, if (filp->f_flags & O_NONBLOCK) return ret ? : -EAGAIN; - if(need_resched()){ - current->state = TASK_INTERRUPTIBLE; - schedule_timeout(1); - } + if(need_resched()) + schedule_timeout_interruptible(1); } else return n; if (signal_pending (current))