linux/drivers/block/drbd
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
..
drbd_actlog.c drbd: get rid of drbd_queue_work_front 2014-07-10 18:34:56 +02:00
drbd_bitmap.c drbd: cosmetic: change all printk(level, ...) to pr_<level>(...) 2014-07-10 18:35:05 +02:00
drbd_int.h drbd: add drbd_queue_work_if_unqueued helper 2014-07-10 18:35:07 +02:00
drbd_interval.c Merge branch 'drbd-8.4_ed6' into for-3.8-drivers-drbd-8.4_ed6 2012-11-09 14:20:23 +01:00
drbd_interval.h drbd: application writes may set-in-sync in protocol != C 2014-07-10 18:35:02 +02:00
drbd_main.c drbd: cosmetic: change all printk(level, ...) to pr_<level>(...) 2014-07-10 18:35:05 +02:00
drbd_nl.c drbd: cosmetic: change all printk(level, ...) to pr_<level>(...) 2014-07-10 18:35:05 +02:00
drbd_nla.c drbd: Remove drbd_wrappers.h 2014-04-30 13:46:54 -06:00
drbd_nla.h drbd: Split off netlink mandatory attribute handling into separate file 2012-11-08 16:57:45 +01:00
drbd_proc.c drbd: fix bogus resync stats in /proc/drbd 2014-07-10 18:34:59 +02:00
drbd_protocol.h drbd: Enable QUEUE_FLAG_DISCARD only if the peer can recieve P_TRIM 2014-04-30 13:46:55 -06:00
drbd_receiver.c drbd: application writes may set-in-sync in protocol != C 2014-07-10 18:35:02 +02:00
drbd_req.c drbd: short-circuit in maybe_pull_ahead 2014-07-10 18:35:02 +02:00
drbd_req.h drbd: silence -Wmissing-prototypes warnings 2014-07-10 18:34:57 +02:00
drbd_state.c drbd: clear CRASHED_PRIMARY only after successful resync 2014-07-10 18:35:05 +02:00
drbd_state.h drbd: Rename drbd_tconn -> drbd_connection 2014-02-17 16:44:47 +01:00
drbd_strings.c drbd: Move string function prototypes from linux/drbd.h to drbd_string.h 2014-02-17 16:50:37 +01:00
drbd_strings.h drbd: Move string function prototypes from linux/drbd.h to drbd_string.h 2014-02-17 16:50:37 +01:00
drbd_vli.h Fix common misspellings 2011-03-31 11:26:23 -03:00
drbd_worker.c drbd: add drbd_queue_work_if_unqueued helper 2014-07-10 18:35:07 +02:00
Kconfig drbd: update Kconfig to match current dependencies 2012-12-06 13:08:29 +01:00
Makefile drbd: Split off netlink mandatory attribute handling into separate file 2012-11-08 16:57:45 +01:00