Skip to content

Commit

Permalink
drbd: Terminate a connection early if sending the protocol fails
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Philipp Reisner authored and Jens Axboe committed Apr 22, 2010
1 parent 7ac314c commit 7e2455c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/block/drbd/drbd_receiver.c
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,8 @@ static int drbd_connect(struct drbd_conf *mdev)

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);
Expand Down

0 comments on commit 7e2455c

Please sign in to comment.