]> git.baikalelectronics.ru Git - kernel.git/commit
workqueue: set delayed_work->timer function on initialization
authorTejun Heo <tj@kernel.org>
Fri, 3 Aug 2012 17:30:45 +0000 (10:30 -0700)
committerTejun Heo <tj@kernel.org>
Fri, 3 Aug 2012 17:30:45 +0000 (10:30 -0700)
commit46a466dff75e8e7272c20bd0534e77b6f8a672b7
tree72e930ab0a14bf50fa1dc6802722483247b72806
parent5fe042eace1be385883544d13cfc4d9ed276f36f
workqueue: set delayed_work->timer function on initialization

delayed_work->timer.function is currently initialized during
queue_delayed_work_on().  Export delayed_work_timer_fn() and set
delayed_work timer function during delayed_work initialization
together with other fields.

This ensures the timer function is always valid on an initialized
delayed_work.  This is to help mod_delayed_work() implementation.

To detect delayed_work users which diddle with the internal timer,
trigger WARN if timer function doesn't match on queue.

Signed-off-by: Tejun Heo <tj@kernel.org>
include/linux/workqueue.h
kernel/workqueue.c