]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drbd: Do not drop net config if sending in drbd_send_protocol() fails
authorPhilipp Reisner <philipp.reisner@linbit.com>
Fri, 14 Jan 2011 23:21:15 +0000 (00:21 +0100)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Thu, 10 Mar 2011 10:45:37 +0000 (11:45 +0100)
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
drivers/block/drbd/drbd_main.c
drivers/block/drbd/drbd_receiver.c

index 8ec7c65988befd1c9dcfbe50a5c1a70559dc0d65..1061b9fff2b080bf898fcb7cc483aa71a055831f 100644 (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);
index 18cb8b609fe4848d46adabdf6b3eb3b00fb8ae92..fb8e86153fd09c50c78a6608bf7454aafd1e96e4 100644 (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);