Skip to content

Commit

Permalink
drbd: drbd_send_short_cmd(): Return 0 upon success and an error code …
Browse files Browse the repository at this point in the history
…otherwise

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
  • Loading branch information
Andreas Gruenbacher authored and Philipp Reisner committed Nov 8, 2012
1 parent 6bdb9b0 commit a896527
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/block/drbd/drbd_int.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion drivers/block/drbd/drbd_worker.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a896527

Please sign in to comment.