diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index 9c888e5b648fa063df8587ed4394e33522fd2fbf..e546dd3fab8a8100a5380b37bb4fc11a6e6d8583 100644 --- a/drivers/block/drbd/drbd_receiver.c +++ b/drivers/block/drbd/drbd_receiver.c @@ -4440,6 +4440,11 @@ static int drbd_disconnected(struct drbd_conf *mdev) drbd_finish_peer_reqs(mdev); + /* This second workqueue flush is necessary, since drbd_finish_peer_reqs() + might have issued a work again. The one before drbd_finish_peer_reqs() is + necessary to reclain net_ee in drbd_finish_peer_reqs(). */ + drbd_flush_workqueue(mdev); + kfree(mdev->p_uuid); mdev->p_uuid = NULL;