drbd: make suspend_io() / resume_io() must be thread and recursion safe
authorPhilipp Reisner <philipp.reisner@linbit.com>
Thu, 28 Feb 2013 09:30:19 +0000 (10:30 +0100)
committerJens Axboe <axboe@fb.com>
Wed, 25 Nov 2015 16:22:03 +0000 (09:22 -0700)
commit7dbb4386b90a13a7b0cab12aae184e5e04c536c3
tree6a2d4915247505c314e8b3cceb2e1eeb45980cba
parentf85d9f2d02cdcd1b79e00fccd667b37b251ba3ac
drbd: make suspend_io() / resume_io() must be thread and recursion safe

Avoid to prematurely resume application IO: don't set/clear a single
bit, but inc/dec an atomic counter.

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/block/drbd/drbd_int.h
drivers/block/drbd/drbd_nl.c
drivers/block/drbd/drbd_state.c