drbd: Terminate a connection early if sending the protocol fails
authorPhilipp Reisner <philipp.reisner@linbit.com>
Thu, 22 Apr 2010 12:50:23 +0000 (14:50 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Thu, 22 Apr 2010 12:50:23 +0000 (14:50 +0200)
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>
drivers/block/drbd/drbd_receiver.c

index ed9f1de24a71e39664be0d47976f9375e3e0ac28..3f096e7959b44ad44f990edeac2a118808a73c06 100644 (file)
@@ -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);