Skip to contentSkip to conversation

net/resources: replace schedule_timeout() with

PATCH Applied Nishanth Aravamudan 1 participant 1 message Jan 20, 2005

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 22/39 net/resources: replace schedule_timeout() with

Hi,

Please consider applying.

Description: Use msleep() instead of schedule_timeout() to guarantee the task delays as expected. The current code uses TASK_INTERRUPTIBLE, but does not check for signals, so I believe the change to msleep() should be ok.

net/atm/resources.c +2 -2
@@ -16,6 +16,7 @@
 #include <linux/kernel.h> /* for barrier */
 #include <linux/module.h>
 #include <linux/bitops.h>
+#include <linux/delay.h>
 #include <net/sock.h>	 /* for struct sock */
 
 #include "common.h"
@@ -137,8 +138,7 @@ void atm_dev_deregister(struct atm_dev *
 
         warning_time = jiffies;
         while (atomic_read(&dev->refcnt) != 1) {
-                current->state = TASK_INTERRUPTIBLE;
-                schedule_timeout(HZ / 4);
+                msleep(250);
                 if ((jiffies - warning_time) > 10 * HZ) {
                         printk(KERN_EMERG "atm_dev_deregister: waiting for "
                                "dev %d to become free. Usage count = %d\n",

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors