Commit 148efa16 authored by Philipp Reisner's avatar Philipp Reisner

drbd: Do not drop net config if sending in drbd_send_protocol() fails

Signed-off-by: default avatarPhilipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: default avatarLars Ellenberg <lars.ellenberg@linbit.com>
parent 370a43e7
...@@ -1967,7 +1967,7 @@ int drbd_send_protocol(struct drbd_conf *mdev) ...@@ -1967,7 +1967,7 @@ int drbd_send_protocol(struct drbd_conf *mdev)
else { else {
dev_err(DEV, "--dry-run is not supported by peer"); dev_err(DEV, "--dry-run is not supported by peer");
kfree(p); kfree(p);
return 0; return -1;
} }
} }
p->conn_flags = cpu_to_be32(cf); p->conn_flags = cpu_to_be32(cf);
......
...@@ -906,7 +906,7 @@ static int drbd_connect(struct drbd_conf *mdev) ...@@ -906,7 +906,7 @@ static int drbd_connect(struct drbd_conf *mdev)
put_ldev(mdev); put_ldev(mdev);
} }
if (!drbd_send_protocol(mdev)) if (drbd_send_protocol(mdev) == -1)
return -1; return -1;
drbd_send_sync_param(mdev, &mdev->sync_conf); drbd_send_sync_param(mdev, &mdev->sync_conf);
drbd_send_sizes(mdev, 0, 0); drbd_send_sizes(mdev, 0, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment