summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorPhilipp Reisner <philipp.reisner@linbit.com>2010-04-22 14:50:23 +0200
committerJens Axboe <jens.axboe@oracle.com>2010-04-22 14:50:23 +0200
commit7e2455c1a123ceadbb35150a610d61e8443fd340 (patch)
treea2efcd21b21ce8af1ae571d13ab42d65265efb98 /drivers
parent7ac314c82f552eefebaa91c9fffe8c0d435641b9 (diff)
downloadop-kernel-dev-7e2455c1a123ceadbb35150a610d61e8443fd340.zip
op-kernel-dev-7e2455c1a123ceadbb35150a610d61e8443fd340.tar.gz
drbd: Terminate a connection early if sending the protocol fails
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/drbd/drbd_receiver.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index ed9f1de..3f096e79 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);
OpenPOWER on IntegriCloud