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

drbd: conn_send_state_req(): Return 0 upon success and an error code otherwise

Signed-off-by: default avatarPhilipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: default avatarLars Ellenberg <lars.ellenberg@linbit.com>
parent 758970c8
...@@ -1962,7 +1962,7 @@ static inline int conn_send_state_req(struct drbd_tconn *tconn, ...@@ -1962,7 +1962,7 @@ static inline int conn_send_state_req(struct drbd_tconn *tconn,
union drbd_state mask, union drbd_state val) union drbd_state mask, union drbd_state val)
{ {
enum drbd_packet cmd = tconn->agreed_pro_version < 100 ? P_STATE_CHG_REQ : P_CONN_ST_CHG_REQ; enum drbd_packet cmd = tconn->agreed_pro_version < 100 ? P_STATE_CHG_REQ : P_CONN_ST_CHG_REQ;
return !_conn_send_state_req(tconn, 0, cmd, mask, val); return _conn_send_state_req(tconn, 0, cmd, mask, val);
} }
static inline void drbd_thread_stop(struct drbd_thread *thi) static inline void drbd_thread_stop(struct drbd_thread *thi)
......
...@@ -1438,7 +1438,7 @@ conn_cl_wide(struct drbd_tconn *tconn, union drbd_state mask, union drbd_state v ...@@ -1438,7 +1438,7 @@ conn_cl_wide(struct drbd_tconn *tconn, union drbd_state mask, union drbd_state v
spin_unlock_irq(&tconn->req_lock); spin_unlock_irq(&tconn->req_lock);
mutex_lock(&tconn->cstate_mutex); mutex_lock(&tconn->cstate_mutex);
if (!conn_send_state_req(tconn, mask, val)) { if (conn_send_state_req(tconn, mask, val)) {
rv = SS_CW_FAILED_BY_PEER; rv = SS_CW_FAILED_BY_PEER;
/* if (f & CS_VERBOSE) /* if (f & CS_VERBOSE)
print_st_err(mdev, os, ns, rv); */ print_st_err(mdev, os, ns, rv); */
......
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