dm-deamon now take note of the timeout hint returned from the work function. [Kevn Corry] --- diff/drivers/md/dm-daemon.c 2004-01-02 12:29:02.000000000 +0000 +++ source/drivers/md/dm-daemon.c 2004-01-16 17:18:00.000000000 +0000 @@ -16,6 +16,7 @@ { struct dm_daemon *dd = (struct dm_daemon *) arg; DECLARE_WAITQUEUE(wq, current); + jiffy_t timeout; daemonize("%s", dd->name); @@ -42,12 +43,15 @@ do { set_current_state(TASK_RUNNING); atomic_set(&dd->woken, 0); - dd->fn(); + timeout = dd->fn(); set_current_state(TASK_INTERRUPTIBLE); } while (atomic_read(&dd->woken)); - schedule(); + if (timeout) + schedule_timeout(timeout); + else + schedule(); } out: