Re: [PATCH] Relay CPU Hotplug support

From: Oleg Nesterov
Date: Fri Dec 22 2006 - 11:44:08 EST


On 12/22, Oleg Nesterov wrote:
>
> void flush_work(struct workqueue_struct *wq, struct work_struct *work)
> {
> struct cpu_workqueue_struct *cwq;
>
> cwq = get_wq_data(work);
> if (!cwq)
> return;
>
> spin_lock_irq(&cwq->lock);
> list_del_init(&work->entry);
> work_release(work);
> spin_unlock_irq(&cwq->lock);

Err, forgot to mention, this should be done under workqueue_mutex
or we should re-check cwq == get_wq_data(), I didn't decide yet.

Sorry for extra noise.

Oleg.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/