Lars Ellenberg 15e26f6a3c drbd: add drbd_queue_work_if_unqueued helper
We sometimes do
    if (list_empty(&w.list))
	drbd_queue_work(&q, &w.list);

Removal (list_del_init) may happen outside all locks, after all
pending work entries have been moved to an on-stack local work list.

For not dynamically allocated, but embeded, work structs,
we must avoid to re-add until it really was removed.

Move that list_empty check inside the spin_lock(&q->q_lock)
within the helper function, and change to list_empty_careful().

This may have been the reason for a list_add corruption
inside drbd_queue_work().

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
2014-07-10 18:35:07 +02:00
..
2014-06-23 16:47:44 -07:00
2014-06-04 09:08:25 -07:00
2014-06-17 14:28:04 +02:00
2014-06-26 13:34:15 +01:00
2014-06-25 12:19:01 -07:00
2014-06-17 15:43:48 -07:00
2014-06-11 14:06:55 -07:00
2014-06-02 16:35:49 -07:00
2014-06-06 11:44:09 -07:00
2014-06-26 10:48:23 +01:00
2014-06-25 12:19:01 -07:00
2014-06-23 09:22:48 +03:00