diff options
author | Nishanth Aravamudan <nacc@us.ibm.com> | 2005-02-08 00:20:23 -0800 |
---|---|---|
committer | David S. Miller <davem@kernel.bkbits.net> | 2005-02-08 00:20:23 -0800 |
commit | 3b3ed7823cd33cc1ebdee3f8c47e6e7169e7fb6c (patch) | |
tree | ccd72b680cb47cb8aa15289b8495a88d3c77dd21 | |
parent | fc86dddb3b4ddc3594bba99c92707428acb6534f (diff) |
[NET]: Replace schedule_timeout() with msleep() in netdev_wait_allrefs()
Description: Use msleep() instead of schedule_timeout() to guarantee the task
delays as expected. The current code uses TASK_INTERRUPTIBLE, but does not
respond to signals, so msleep() should be ok.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/core/dev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 4dc01e26f158b..5d4abaa853510 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -108,6 +108,7 @@ #include <linux/kallsyms.h> #include <linux/netpoll.h> #include <linux/rcupdate.h> +#include <linux/delay.h> #ifdef CONFIG_NET_RADIO #include <linux/wireless.h> /* Note : will define WIRELESS_EXT */ #include <net/iw_handler.h> @@ -2899,8 +2900,7 @@ static void netdev_wait_allrefs(struct net_device *dev) rebroadcast_time = jiffies; } - current->state = TASK_INTERRUPTIBLE; - schedule_timeout(HZ / 4); + msleep(250); if (time_after(jiffies, warning_time + 10 * HZ)) { printk(KERN_EMERG "unregister_netdevice: " |