Skip to contentSkip to conversation

w1/w1_family: replace schedule_timeout() with

PATCH New Nishanth Aravamudan 1 participant 1 message Oct 23, 2004

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

PATCH 1/1 w1/w1_family: replace schedule_timeout() with

Any comments would be, as always, appreciated.

-Nish

Description: Use msleep_interruptible() instead of schedule_timeout() to guarantee the task delays as expected.

drivers/w1/w1_family.c +1 -3
@@ -87,10 +87,8 @@ void w1_unregister_family(struct w1_fami
 	while (atomic_read(&fent->refcnt)) {
 		printk(KERN_INFO "Waiting for family %u to become free: refcnt=%d.\n",
 				fent->fid, atomic_read(&fent->refcnt));
-		set_current_state(TASK_INTERRUPTIBLE);
-		schedule_timeout(HZ);
 
-		if (signal_pending(current))
+		if (msleep_interruptible(1000))
 			flush_signals(current);
 	}
 }

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