diff options
author | Andreas Gruenbacher <agruen@linbit.com> | 2010-12-10 15:04:00 -0500 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2011-03-10 05:36:29 -0500 |
commit | de1f8e4a0af3c2d0dff9f6341fead4b509941282 (patch) | |
tree | e8bbbbdd18a11434c7608c9cf3ceaba0e3fe5ac2 /drivers/block | |
parent | 4114be815f9811da42a21dc2f7ff552833660595 (diff) |
drbd: receive_bitmap: Avoid casting enum drbd_state_rv to int
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/drbd/drbd_receiver.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index 44b102d41b4a..2a604e7b7a01 100644 --- a/drivers/block/drbd/drbd_receiver.c +++ b/drivers/block/drbd/drbd_receiver.c | |||
@@ -3522,12 +3522,14 @@ static int receive_bitmap(struct drbd_conf *mdev, enum drbd_packets cmd, unsigne | |||
3522 | INFO_bm_xfer_stats(mdev, "receive", &c); | 3522 | INFO_bm_xfer_stats(mdev, "receive", &c); |
3523 | 3523 | ||
3524 | if (mdev->state.conn == C_WF_BITMAP_T) { | 3524 | if (mdev->state.conn == C_WF_BITMAP_T) { |
3525 | enum drbd_state_rv rv; | ||
3526 | |||
3525 | ok = !drbd_send_bitmap(mdev); | 3527 | ok = !drbd_send_bitmap(mdev); |
3526 | if (!ok) | 3528 | if (!ok) |
3527 | goto out; | 3529 | goto out; |
3528 | /* Omit CS_ORDERED with this state transition to avoid deadlocks. */ | 3530 | /* Omit CS_ORDERED with this state transition to avoid deadlocks. */ |
3529 | ok = _drbd_request_state(mdev, NS(conn, C_WF_SYNC_UUID), CS_VERBOSE); | 3531 | rv = _drbd_request_state(mdev, NS(conn, C_WF_SYNC_UUID), CS_VERBOSE); |
3530 | D_ASSERT(ok == SS_SUCCESS); | 3532 | D_ASSERT(rv == SS_SUCCESS); |
3531 | } else if (mdev->state.conn != C_WF_BITMAP_S) { | 3533 | } else if (mdev->state.conn != C_WF_BITMAP_S) { |
3532 | /* admin may have requested C_DISCONNECTING, | 3534 | /* admin may have requested C_DISCONNECTING, |
3533 | * other threads may have noticed network errors */ | 3535 | * other threads may have noticed network errors */ |