drbd: drbd_send_short_cmd(): Return 0 upon success and an error code otherwise
authorAndreas Gruenbacher <agruen@linbit.com>
Wed, 16 Mar 2011 15:08:22 +0000 (16:08 +0100)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Thu, 8 Nov 2012 15:44:43 +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_int.h
drivers/block/drbd/drbd_worker.c

index bcb3bc25a7223cf2a53238df8579d716974d905b..173fed633e286cac2bd85dca528cb7c6b9291661 100644 (file)
@@ -1937,7 +1937,7 @@ static inline int drbd_send_short_cmd(struct drbd_conf *mdev,
                                      enum drbd_packet cmd)
 {
        struct p_header h;
-       return !drbd_send_cmd(mdev, &mdev->tconn->data, cmd, &h, sizeof(h));
+       return drbd_send_cmd(mdev, &mdev->tconn->data, cmd, &h, sizeof(h));
 }
 
 static inline int drbd_send_ping(struct drbd_tconn *tconn)
index b42ba1af8068e46d455e841d919c535b050f2b99..0dd2f2d81de2d8c60f4d2c4e01c3ca59fcacacdc 100644 (file)
@@ -1227,7 +1227,7 @@ int w_send_write_hint(struct drbd_work *w, int cancel)
        struct drbd_conf *mdev = w->mdev;
        if (cancel)
                return 1;
-       return drbd_send_short_cmd(mdev, P_UNPLUG_REMOTE);
+       return !drbd_send_short_cmd(mdev, P_UNPLUG_REMOTE);
 }
 
 int w_send_oos(struct drbd_work *w, int cancel)