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

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
This commit is contained in:
Philipp Reisner 2011-01-15 00:21:15 +01:00
parent 370a43e798
commit 148efa165e
2 changed files with 2 additions and 2 deletions

View File

@ -1967,7 +1967,7 @@ int drbd_send_protocol(struct drbd_conf *mdev)
else {
dev_err(DEV, "--dry-run is not supported by peer");
kfree(p);
return 0;
return -1;
}
}
p->conn_flags = cpu_to_be32(cf);

View File

@ -906,7 +906,7 @@ retry:
put_ldev(mdev);
}
if (!drbd_send_protocol(mdev))
if (drbd_send_protocol(mdev) == -1)
return -1;
drbd_send_sync_param(mdev, &mdev->sync_conf);
drbd_send_sizes(mdev, 0, 0);