提交 758970c8 编写于 作者: A Andreas Gruenbacher 提交者: Philipp Reisner

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

Signed-off-by: NPhilipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: NLars Ellenberg <lars.ellenberg@linbit.com>
上级 f02d4d0a
......@@ -1955,14 +1955,14 @@ static inline int drbd_send_ping_ack(struct drbd_tconn *tconn)
static inline int drbd_send_state_req(struct drbd_conf *mdev,
union drbd_state mask, union drbd_state val)
{
return _conn_send_state_req(mdev->tconn, mdev->vnr, P_STATE_CHG_REQ, mask, val);
return !_conn_send_state_req(mdev->tconn, mdev->vnr, P_STATE_CHG_REQ, mask, val);
}
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)
......
......@@ -995,7 +995,7 @@ int _conn_send_state_req(struct drbd_tconn *tconn, int vnr, enum drbd_packet cmd
p.mask = cpu_to_be32(mask.i);
p.val = cpu_to_be32(val.i);
return !conn_send_cmd(tconn, vnr, &tconn->data, cmd, &p.head, sizeof(p));
return conn_send_cmd(tconn, vnr, &tconn->data, cmd, &p.head, sizeof(p));
}
int drbd_send_sr_reply(struct drbd_conf *mdev, enum drbd_state_rv retcode)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册