drbd: drbd_get_data_sock(): Return 0 upon success and an error code otherwise
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
index 52378cc..d4546d0 100644
--- a/drivers/block/drbd/drbd_main.c
+++ b/drivers/block/drbd/drbd_main.c
@@ -773,7 +773,7 @@
prepare_header80(&h, cmd, size);
- if (!drbd_get_data_sock(tconn))
+ if (drbd_get_data_sock(tconn))
return 0;
ok = (sizeof(h) ==
@@ -1245,7 +1245,7 @@
{
int err;
- if (!drbd_get_data_sock(mdev->tconn))
+ if (drbd_get_data_sock(mdev->tconn))
return -1;
err = !_drbd_send_bitmap(mdev);
drbd_put_data_sock(mdev->tconn);
@@ -1562,7 +1562,7 @@
void *dgb;
int dgs;
- if (!drbd_get_data_sock(mdev->tconn))
+ if (drbd_get_data_sock(mdev->tconn))
return 0;
dgs = (mdev->tconn->agreed_pro_version >= 87 && mdev->tconn->integrity_w_tfm) ?
@@ -1652,7 +1652,7 @@
* This one may be interrupted by DRBD_SIG and/or DRBD_SIGKILL
* in response to admin command or module unload.
*/
- if (!drbd_get_data_sock(mdev->tconn))
+ if (drbd_get_data_sock(mdev->tconn))
return 0;
ok = sizeof(p) == drbd_send(mdev->tconn, mdev->tconn->data.socket, &p, sizeof(p), dgs ? MSG_MORE : 0);