ChangeSet 1.2014.1.4, 2004/11/05 13:40:14-08:00, johnpol@2ka.mipt.ru [PATCH] w1/w1: replace schedule_timeout() with msleep_interruptible() Description: Use msleep_interruptible() instead of schedule_timeout() to guarantee the task delays as expected. Signed-off-by: Nishanth Aravamudan Signed-off-by: Evgeniy Polyakov Signed-off-by: Greg Kroah-Hartman drivers/w1/w1.c | 4 +--- 1 files changed, 1 insertion(+), 3 deletions(-) diff -Nru a/drivers/w1/w1.c b/drivers/w1/w1.c --- a/drivers/w1/w1.c 2004-11-08 18:56:10 -08:00 +++ b/drivers/w1/w1.c 2004-11-08 18:56:10 -08:00 @@ -452,10 +452,8 @@ while (atomic_read(&sl->refcnt)) { printk(KERN_INFO "Waiting for %s to become free: refcnt=%d.\n", sl->name, atomic_read(&sl->refcnt)); - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(HZ); - if (signal_pending(current)) + if (msleep_interruptible(1000)) flush_signals(current); }