Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 345890
b: refs/heads/master
c: 596a37f
h: refs/heads/master
v: v3
  • Loading branch information
Andreas Gruenbacher authored and Philipp Reisner committed Nov 8, 2012
1 parent 2ab3a6c commit d6fe678
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 04dfa137881efc890544c5cd3af94e54cfe0c480
refs/heads/master: 596a37f9eff332fa034cd6bea0c0ee2e09c7d900
6 changes: 3 additions & 3 deletions trunk/drivers/block/drbd/drbd_int.h
Original file line number Diff line number Diff line change
Expand Up @@ -1932,7 +1932,7 @@ static inline int _drbd_send_cmd(struct drbd_conf *mdev, struct socket *sock,
static inline int drbd_send_cmd(struct drbd_conf *mdev, int use_data_socket,
enum drbd_packet cmd, struct p_header *h, size_t size)
{
return conn_send_cmd(mdev->tconn, mdev->vnr, use_data_socket, cmd, h, size);
return !conn_send_cmd(mdev->tconn, mdev->vnr, use_data_socket, cmd, h, size);
}

static inline int drbd_send_short_cmd(struct drbd_conf *mdev,
Expand All @@ -1945,13 +1945,13 @@ static inline int drbd_send_short_cmd(struct drbd_conf *mdev,
static inline int drbd_send_ping(struct drbd_tconn *tconn)
{
struct p_header h;
return conn_send_cmd(tconn, 0, USE_META_SOCKET, P_PING, &h, sizeof(h));
return !conn_send_cmd(tconn, 0, USE_META_SOCKET, P_PING, &h, sizeof(h));
}

static inline int drbd_send_ping_ack(struct drbd_tconn *tconn)
{
struct p_header h;
return conn_send_cmd(tconn, 0, USE_META_SOCKET, P_PING_ACK, &h, sizeof(h));
return !conn_send_cmd(tconn, 0, USE_META_SOCKET, P_PING_ACK, &h, sizeof(h));
}

static inline int drbd_send_state_req(struct drbd_conf *mdev,
Expand Down
10 changes: 5 additions & 5 deletions trunk/drivers/block/drbd/drbd_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -739,8 +739,8 @@ int _conn_send_cmd(struct drbd_tconn *tconn, int vnr, struct socket *sock,
int conn_send_cmd(struct drbd_tconn *tconn, int vnr, int use_data_socket,
enum drbd_packet cmd, struct p_header *h, size_t size)
{
int ok = 0;
struct socket *sock;
int err = -EIO;

if (use_data_socket) {
mutex_lock(&tconn->data.mutex);
Expand All @@ -753,13 +753,13 @@ int conn_send_cmd(struct drbd_tconn *tconn, int vnr, int use_data_socket,
/* drbd_disconnect() could have called drbd_free_sock()
* while we were waiting in down()... */
if (likely(sock != NULL))
ok = !_conn_send_cmd(tconn, vnr, sock, cmd, h, size, 0);
err = _conn_send_cmd(tconn, vnr, sock, cmd, h, size, 0);

if (use_data_socket)
mutex_unlock(&tconn->data.mutex);
else
mutex_unlock(&tconn->meta.mutex);
return ok;
return err;
}

int conn_send_cmd2(struct drbd_tconn *tconn, enum drbd_packet cmd, char *data,
Expand Down Expand Up @@ -1011,7 +1011,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, USE_DATA_SOCKET, cmd, &p.head, sizeof(p));
return !conn_send_cmd(tconn, vnr, USE_DATA_SOCKET, cmd, &p.head, sizeof(p));
}

int drbd_send_sr_reply(struct drbd_conf *mdev, enum drbd_state_rv retcode)
Expand All @@ -1030,7 +1030,7 @@ int conn_send_sr_reply(struct drbd_tconn *tconn, enum drbd_state_rv retcode)

p.retcode = cpu_to_be32(retcode);

return conn_send_cmd(tconn, 0, USE_META_SOCKET, cmd, &p.head, sizeof(p));
return !conn_send_cmd(tconn, 0, USE_META_SOCKET, cmd, &p.head, sizeof(p));
}

int fill_bitmap_rle_bits(struct drbd_conf *mdev,
Expand Down

0 comments on commit d6fe678

Please sign in to comment.