From: Philipp Reisner Date: Fri, 14 Jan 2011 23:21:15 +0000 (+0100) Subject: drbd: Do not drop net config if sending in drbd_send_protocol() fails X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=148efa165e9464927887b03c83a52c33b80b4431;p=linux-beck.git drbd: Do not drop net config if sending in drbd_send_protocol() fails Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index 8ec7c65988be..1061b9fff2b0 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c @@ -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); diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index 18cb8b609fe4..fb8e86153fd0 100644 --- a/drivers/block/drbd/drbd_receiver.c +++ b/drivers/block/drbd/drbd_receiver.c @@ -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);