Commit de1f8e4a authored by Andreas Gruenbacher's avatar Andreas Gruenbacher Committed by Philipp Reisner

drbd: receive_bitmap: Avoid casting enum drbd_state_rv to int

Signed-off-by: default avatarPhilipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: default avatarLars Ellenberg <lars.ellenberg@linbit.com>
parent 4114be81
...@@ -3522,12 +3522,14 @@ static int receive_bitmap(struct drbd_conf *mdev, enum drbd_packets cmd, unsigne ...@@ -3522,12 +3522,14 @@ static int receive_bitmap(struct drbd_conf *mdev, enum drbd_packets cmd, unsigne
INFO_bm_xfer_stats(mdev, "receive", &c); INFO_bm_xfer_stats(mdev, "receive", &c);
if (mdev->state.conn == C_WF_BITMAP_T) { if (mdev->state.conn == C_WF_BITMAP_T) {
enum drbd_state_rv rv;
ok = !drbd_send_bitmap(mdev); ok = !drbd_send_bitmap(mdev);
if (!ok) if (!ok)
goto out; goto out;
/* Omit CS_ORDERED with this state transition to avoid deadlocks. */ /* Omit CS_ORDERED with this state transition to avoid deadlocks. */
ok = _drbd_request_state(mdev, NS(conn, C_WF_SYNC_UUID), CS_VERBOSE); rv = _drbd_request_state(mdev, NS(conn, C_WF_SYNC_UUID), CS_VERBOSE);
D_ASSERT(ok == SS_SUCCESS); D_ASSERT(rv == SS_SUCCESS);
} else if (mdev->state.conn != C_WF_BITMAP_S) { } else if (mdev->state.conn != C_WF_BITMAP_S) {
/* admin may have requested C_DISCONNECTING, /* admin may have requested C_DISCONNECTING,
* other threads may have noticed network errors */ * other threads may have noticed network errors */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment