Ok, then I have question: Is the following pseudocode correct
(and problem is in lock validation which checks something
already initialized for another queue) or reusing work_struct
is not permitted from inside called work function ?
(Note comment in code "It is permissible to free the struct
work_struct from inside the function that is called from it".)
struct work_struct work;
struct workqueue_struct *a, *b;
do_b(*work)
{
/* do something else */
}
do_a(*work)
{
/* do something */
INIT_WORK(&work, do_b);
queue_work(b, &work);
}
INIT_WORK(&work, do_a);
queue_work(a, &work);
Milan
--
mbroz@redhat.com
-