drbd: drbd_send_sizes(): Return 0 upon success and an error code otherwise
authorAndreas Gruenbacher <agruen@linbit.com>
Wed, 16 Mar 2011 00:12:50 +0000 (01:12 +0100)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Thu, 8 Nov 2012 15:44:35 +0000 (16:44 +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 7ed2e2ebb895946b391f9c912deb86fe588bb4fe..8e3607a2ae0d0b0f44f9b1179504a841ea4ea662 100644 (file)
@@ -938,7 +938,6 @@ int drbd_send_sizes(struct drbd_conf *mdev, int trigger_reply, enum dds_flags fl
        struct p_sizes p;
        sector_t d_size, u_size;
        int q_order_type, max_bio_size;
-       int ok;
 
        if (get_ldev_if_state(mdev, D_NEGOTIATING)) {
                D_ASSERT(mdev->ldev->backing_bdev);
@@ -962,8 +961,7 @@ int drbd_send_sizes(struct drbd_conf *mdev, int trigger_reply, enum dds_flags fl
        p.queue_order_type = cpu_to_be16(q_order_type);
        p.dds_flags = cpu_to_be16(flags);
 
-       ok = !drbd_send_cmd(mdev, &mdev->tconn->data, P_SIZES, &p.head, sizeof(p));
-       return ok;
+       return drbd_send_cmd(mdev, &mdev->tconn->data, P_SIZES, &p.head, sizeof(p));
 }
 
 /**
index 1403e4b18a28fc110de1063325a7d2f207508f3e..30a9559918a0071eb9bcbab673d76f1879b794a9 100644 (file)
@@ -764,7 +764,7 @@ int drbd_connected(int vnr, void *p, void *data)
                &mdev->own_state_mutex;
 
        ok &= !drbd_send_sync_param(mdev);
-       ok &= drbd_send_sizes(mdev, 0, 0);
+       ok &= !drbd_send_sizes(mdev, 0, 0);
        ok &= !drbd_send_uuids(mdev);
        ok &= !drbd_send_state(mdev);
        clear_bit(USE_DEGR_WFC_T, &mdev->flags);