diff options
author | Nishanth Aravamudan <nacc@us.ibm.com> | 2005-06-22 22:11:44 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-06-22 22:11:44 -0700 |
commit | 285b3afefacff14bc98e5754b8b48a0a2b42f0df (patch) | |
tree | 3294a65cafb6003455d9280ff630191d97a25e64 /net/appletalk | |
parent | 7abaa27c1c54208bd76fa8bae55839c034aebfb2 (diff) | |
download | linux-285b3afefacff14bc98e5754b8b48a0a2b42f0df.tar.gz linux-285b3afefacff14bc98e5754b8b48a0a2b42f0df.tar.bz2 linux-285b3afefacff14bc98e5754b8b48a0a2b42f0df.zip |
[ATALK] aarp: replace schedule_timeout() with msleep()
From: Nishanth Aravamudan <nacc@us.ibm.com>
Use msleep() instead of schedule_timeout() to guarantee the task
delays as expected. The current code is not wrong, but it does not account for
early return due to signals, so I think msleep() should be appropriate.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Domen Puncer <domen@coderock.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/appletalk')
-rw-r--r-- | net/appletalk/aarp.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/net/appletalk/aarp.c b/net/appletalk/aarp.c index 10d040461021..c34614ea5fce 100644 --- a/net/appletalk/aarp.c +++ b/net/appletalk/aarp.c @@ -35,6 +35,7 @@ #include <net/datalink.h> #include <net/psnap.h> #include <linux/atalk.h> +#include <linux/delay.h> #include <linux/init.h> #include <linux/proc_fs.h> #include <linux/seq_file.h> @@ -462,8 +463,7 @@ void aarp_probe_network(struct atalk_iface *atif) aarp_send_probe(atif->dev, &atif->address); /* Defer 1/10th */ - current->state = TASK_INTERRUPTIBLE; - schedule_timeout(HZ / 10); + msleep(100); if (atif->status & ATIF_PROBE_FAIL) break; @@ -510,9 +510,8 @@ int aarp_proxy_probe_network(struct atalk_iface *atif, struct atalk_addr *sa) aarp_send_probe(atif->dev, sa); /* Defer 1/10th */ - current->state = TASK_INTERRUPTIBLE; write_unlock_bh(&aarp_lock); - schedule_timeout(HZ / 10); + msleep(100); write_lock_bh(&aarp_lock); if (entry->status & ATIF_PROBE_FAIL) |