Commit 957c132c authored by Evgeniy Polyakov's avatar Evgeniy Polyakov Committed by Greg Kroah-Hartman

[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: default avatarNishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: default avatarEvgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 85429ee1
...@@ -452,10 +452,8 @@ static void w1_slave_detach(struct w1_slave *sl) ...@@ -452,10 +452,8 @@ static void w1_slave_detach(struct w1_slave *sl)
while (atomic_read(&sl->refcnt)) { while (atomic_read(&sl->refcnt)) {
printk(KERN_INFO "Waiting for %s to become free: refcnt=%d.\n", printk(KERN_INFO "Waiting for %s to become free: refcnt=%d.\n",
sl->name, atomic_read(&sl->refcnt)); 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); flush_signals(current);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment