[NET]: fix-up schedule_timeout() usage
Use schedule_timeout_{,un}interruptible() instead of set_current_state()/schedule_timeout() to reduce kernel size. Also use human-time conversion functions instead of hard-coded division to avoid rounding issues. Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
7672d0b544
commit
121caf577d
@@ -1103,10 +1103,8 @@ static int __init ic_dynamic(void)
|
||||
#endif
|
||||
|
||||
jiff = jiffies + (d->next ? CONF_INTER_TIMEOUT : timeout);
|
||||
while (time_before(jiffies, jiff) && !ic_got_reply) {
|
||||
set_current_state(TASK_UNINTERRUPTIBLE);
|
||||
schedule_timeout(1);
|
||||
}
|
||||
while (time_before(jiffies, jiff) && !ic_got_reply)
|
||||
schedule_timeout_uninterruptible(1);
|
||||
#ifdef IPCONFIG_DHCP
|
||||
/* DHCP isn't done until we get a DHCPACK. */
|
||||
if ((ic_got_reply & IC_BOOTP)
|
||||
|
Reference in New Issue
Block a user