From: Philipp Reisner Date: Thu, 22 Apr 2010 12:50:23 +0000 (+0200) Subject: drbd: Terminate a connection early if sending the protocol fails X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=7e2455c1a123ceadbb35150a610d61e8443fd340;p=deliverable%2Flinux.git drbd: Terminate a connection early if sending the protocol fails Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg Signed-off-by: Jens Axboe --- diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index ed9f1de24a71..3f096e7959b4 100644 --- a/drivers/block/drbd/drbd_receiver.c +++ b/drivers/block/drbd/drbd_receiver.c @@ -899,7 +899,8 @@ retry: drbd_thread_start(&mdev->asender); - drbd_send_protocol(mdev); + if (!drbd_send_protocol(mdev)) + return -1; drbd_send_sync_param(mdev, &mdev->sync_conf); drbd_send_sizes(mdev, 0); drbd_send_uuids(mdev);