fix brick_timeout() once again

This commit is contained in:
Thomas Schoebel-Theuer 2011-11-08 12:31:19 +01:00 committed by Thomas Schoebel-Theuer
parent 0eb4e62ecb
commit 19718efb83
1 changed files with 6 additions and 4 deletions

10
brick.c
View File

@ -20,11 +20,13 @@ int brick_msleep(int msecs, bool shorten)
return 0;
}
timeout = msecs_to_jiffies(msecs) + 1;
if (shorten)
timeout = schedule_timeout_interruptible(timeout);
else
timeout = schedule_timeout_interruptible(timeout);
if (!shorten)
while (timeout)
timeout = schedule_timeout_interruptible(timeout);
timeout = schedule_timeout_uninterruptible(timeout);
return jiffies_to_msecs(timeout);
}
EXPORT_SYMBOL_GPL(brick_msleep);