drbd: drbd_send_ping(), drbd_send_ping(): 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_receiver.c b/drivers/block/drbd/drbd_receiver.c
index 9ad8dd3..61104db 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
@@ -4498,7 +4498,7 @@
static int got_Ping(struct drbd_tconn *tconn, struct packet_info *pi)
{
- return drbd_send_ping_ack(tconn);
+ return !drbd_send_ping_ack(tconn);
}
@@ -4851,7 +4851,7 @@
while (get_t_state(thi) == RUNNING) {
drbd_thread_current_set_cpu(thi);
if (test_and_clear_bit(SEND_PING, &tconn->flags)) {
- if (!drbd_send_ping(tconn)) {
+ if (drbd_send_ping(tconn)) {
conn_err(tconn, "drbd_send_ping has failed\n");
goto reconnect;
}