From: Andreas Gruenbacher Date: Wed, 16 Mar 2011 00:17:35 +0000 (+0100) Subject: drbd: conn_send_state_req(): Return 0 upon success and an error code otherwise X-Git-Tag: firefly_0821_release~3680^2~1419^2~18^2~373 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=caee1c3a92246628fa323429db98a9b1a8a758a5;p=firefly-linux-kernel-4.4.55.git drbd: conn_send_state_req(): Return 0 upon success and an error code otherwise Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h index aa426185fe99..1cc8dd759f11 100644 --- a/drivers/block/drbd/drbd_int.h +++ b/drivers/block/drbd/drbd_int.h @@ -1962,7 +1962,7 @@ static inline int conn_send_state_req(struct drbd_tconn *tconn, 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; - 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) diff --git a/drivers/block/drbd/drbd_state.c b/drivers/block/drbd/drbd_state.c index 29372dbad278..a33dda1e7bc3 100644 --- a/drivers/block/drbd/drbd_state.c +++ b/drivers/block/drbd/drbd_state.c @@ -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); 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; /* if (f & CS_VERBOSE) print_st_err(mdev, os, ns, rv); */