drbd: Correctly handle resources without volumes
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c
index 4e1beb7..862d69e 100644
--- a/drivers/block/drbd/drbd_nl.c
+++ b/drivers/block/drbd/drbd_nl.c
@@ -1095,7 +1095,8 @@
{
bool stop_threads;
spin_lock_irq(&tconn->req_lock);
- stop_threads = conn_all_vols_unconf(tconn);
+ stop_threads = conn_all_vols_unconf(tconn) &&
+ tconn->cstate == C_STANDALONE;
spin_unlock_irq(&tconn->req_lock);
if (stop_threads) {
/* asender is implicitly stopped by receiver