drbd: Test cstate while holding req_lock
authorPhilipp Reisner <philipp.reisner@linbit.com>
Mon, 28 Apr 2014 16:43:33 +0000 (18:43 +0200)
committerJens Axboe <axboe@fb.com>
Wed, 30 Apr 2014 19:46:56 +0000 (13:46 -0600)
commit02df6fe145715f1d3858c0c65aed991f148b70b4
tree4e9e2870cd412665c58131222ad9f5572058f491
parentc1b3156f121fd301191e0b4c5fa2fec42cd17871
drbd: Test cstate while holding req_lock

In case a connection transitions into C_TIMEOUT within the timer
function (request_timer_fn()) we need to make sure that the receiver
thread (potentially running on a different CPU) sees the updated
cstate later on.

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_nl.c
include/linux/drbd.h