diff options
author | Andreas Gruenbacher <agruen@linbit.com> | 2010-12-09 10:08:46 -0500 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2011-03-10 05:36:08 -0500 |
commit | cab2f74b45127a78b9a2980f54ca16cc9f45ddac (patch) | |
tree | ce7986dca4c4512251e576db9c0e08e5409fcd8b /drivers/block/drbd/drbd_main.c | |
parent | 220df4d006ed561b8fd4fbd8c01c6c28d6143653 (diff) |
drbd: Make sure that drbd_send() has sent the right number of bytes
Reviewed-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Diffstat (limited to 'drivers/block/drbd/drbd_main.c')
-rw-r--r-- | drivers/block/drbd/drbd_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index 150ed16d26ef..50b6841d135b 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c | |||
@@ -2580,7 +2580,7 @@ int drbd_send_dblock(struct drbd_conf *mdev, struct drbd_request *req) | |||
2580 | if (ok && dgs) { | 2580 | if (ok && dgs) { |
2581 | dgb = mdev->int_dig_out; | 2581 | dgb = mdev->int_dig_out; |
2582 | drbd_csum_bio(mdev, mdev->integrity_w_tfm, req->master_bio, dgb); | 2582 | drbd_csum_bio(mdev, mdev->integrity_w_tfm, req->master_bio, dgb); |
2583 | ok = drbd_send(mdev, mdev->data.socket, dgb, dgs, 0); | 2583 | ok = dgs == drbd_send(mdev, mdev->data.socket, dgb, dgs, 0); |
2584 | } | 2584 | } |
2585 | if (ok) { | 2585 | if (ok) { |
2586 | /* For protocol A, we have to memcpy the payload into | 2586 | /* For protocol A, we have to memcpy the payload into |
@@ -2662,7 +2662,7 @@ int drbd_send_block(struct drbd_conf *mdev, enum drbd_packets cmd, | |||
2662 | if (ok && dgs) { | 2662 | if (ok && dgs) { |
2663 | dgb = mdev->int_dig_out; | 2663 | dgb = mdev->int_dig_out; |
2664 | drbd_csum_ee(mdev, mdev->integrity_w_tfm, e, dgb); | 2664 | drbd_csum_ee(mdev, mdev->integrity_w_tfm, e, dgb); |
2665 | ok = drbd_send(mdev, mdev->data.socket, dgb, dgs, 0); | 2665 | ok = dgs == drbd_send(mdev, mdev->data.socket, dgb, dgs, 0); |
2666 | } | 2666 | } |
2667 | if (ok) | 2667 | if (ok) |
2668 | ok = _drbd_send_zc_ee(mdev, e); | 2668 | ok = _drbd_send_zc_ee(mdev, e); |