Skip to content

Commit

Permalink
drbd: drbd_send_ov_request(): 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 fa79abd commit 5b9f499
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions drivers/block/drbd/drbd_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1342,15 +1342,13 @@ int drbd_send_drequest_csum(struct drbd_conf *mdev, sector_t sector, int size,

int drbd_send_ov_request(struct drbd_conf *mdev, sector_t sector, int size)
{
int ok;
struct p_block_req p;

p.sector = cpu_to_be64(sector);
p.block_id = ID_SYNCER /* unused */;
p.blksize = cpu_to_be32(size);

ok = !drbd_send_cmd(mdev, &mdev->tconn->data, P_OV_REQUEST, &p.head, sizeof(p));
return ok;
return drbd_send_cmd(mdev, &mdev->tconn->data, P_OV_REQUEST, &p.head, sizeof(p));
}

/* called on sndtimeo
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 @@ -695,7 +695,7 @@ static int w_make_ov_request(struct drbd_work *w, int cancel)
size = (capacity-sector)<<9;

inc_rs_pending(mdev);
if (!drbd_send_ov_request(mdev, sector, size)) {
if (drbd_send_ov_request(mdev, sector, size)) {
dec_rs_pending(mdev);
return 0;
}
Expand Down

0 comments on commit 5b9f499

Please sign in to comment.